Query an array of Objects matching word in a string field - mongodb

After executing a query on a huge ontology using Jena, I exported the results in JSON format in a MongoDB collection named items in a database named galileo.
Now I want to query on the collection to find items by their names (names are in the title field), in particular I want that searching for "Astrolabio", I can retrieve all the objects that contain the word "Astrolabio" in the title field (e.g. "Astrolabio", "Astrolabio Piano" etc...).The objects that interest me are contained in the #graph array.
I tried
db.items.find({"#graph":{$elemMatch:{"title":{$regex: /Astrolabio$/}}}})
but it returns lots of objects that don't contain the searched word too.
I tried also
db.items.find({},{"#graph":{$elemMatch:{"title":{$regex: /Astrolabio$/}}}})
but, as I discovered only after my try, it returns only the first object that match the request.
So what's the correct query for what I'm trying to do?
In order to provide an help, here there is a little slice of the document
{
"_id" : ObjectId("59e07632b5d295462b330c4c"),
"#graph" : [
{
"#id" : "http://minerva.atcult.it/rdf/000000016001",
"#type" : [
"bibo:Book",
"bibo:MultiVolumeBook"
],
"P1053" : [
"1 astrolabe",
"1 astrolabio"
],
"abstract" : [
"This astrolabe presently comprises two tympanums, for latitudes 30° and 33°, the other for latitudes 36° and 42° (corresponding to the regions between Persia and the Black Sea). There is an alidade, a rule, and a rete. The back carries a double shadow square and the zodiacal calendar. The instrument comes with a tooled black leather case (cover missing) containing a sixteenth-century manuscript note stating that the astrolabe was brought from Spain and dates from 1252. The astronomical data inscribed on the astrolabe suggest it may have been built before 1000. According to tradition, the instrument dates from the period of Charlemagne (9th C. ). A very similar Arab astrolabe is documented in a drawing by Antonio da Sangallo il Giovane [the Younger] (c.  1520?) at the Gabinetto dei Disegni e delle Stampe (Department of Drawings and Prints) of the Uffizi. Provenance: Medici collections",
"Questo astrolabio contiene attualmente due timpani, uno per le latitudini 30° e 33°, e l'altro 36° e 42° (corrispondenti alle regioni comprese tra la Persia e il Mar Nero). È completo di alidada, di regolo e di rete. Nel dorso presenta un doppio quadrato delle ombre e il calendario zodiacale. Lo strumento, proveniente dalle collezioni medicee, è completo di custodia di pelle nera lavorata (coperchio mancante) che porta all'interno una nota manoscritta del XVI secolo nella quale si ricorda che l'astrolabio fu portato dalla Spagna e che risale al 1252. I dati astronomici riportati sullo strumento suggeriscono di anticiparne la costruzione a prima del 1000. Secondo la tradizione si tratterebbe di uno strumento del tempo di Carlo Magno (IX secolo). Un astrolabio arabo molto simile a questo è documentato in un disegno di Antonio da Sangallo il Giovane (c. 1520?) conservato presso il Gabinetto dei Disegni e delle Stampe degli Uffizi. Proviene dalle collezioni medicee"
],
"contributor" : "http://minerva.atcult.it/rdf/ed494c3a-2ba6-3464-b34a-a57e4f70c5e0",
"creator" : [
"http://minerva.atcult.it/rdf/d481cbac-209b-3741-bba4-906590d805b3",
"http://minerva.atcult.it/rdf/36e6efa2-6c8f-350e-ae37-479dade48850",
"http://minerva.atcult.it/rdf/47734211-2637-3895-a690-4f33412931ec"
],
"identifier" : "000000016001",
"issued" : "sec. X",
"publisher" : "http://minerva.atcult.it/rdf/90310a84-1133-3356-bb3b-647ae1a7d14d",
"title" : "Astrolabio piano",
"numPages" : [
"1 astrolabio",
"1 astrolabe"
],
"placeOfPublication" : "Fattura araba",
"label" : "Astrolabio piano"
},
{
"#id" : "http://minerva.atcult.it/rdf/000000016002",
"#type" : [
"bibo:MultiVolumeBook",
"bibo:Book"
],
"P1053" : [
"1 astrolabe",
"1 astrolabio"
],
"abstract" : [
"Questo piccolo astrolabio contiene quattro timpani per le latitudini 24° e 30°, 31° e 35°, 32° e 36° (corrispondenti alla Persia) e per le latitudini 0° (cioè il circolo dell'equatore) e 66°. È completo di alidada e di rete. Il dorso della madre presenta il calendario lunare, secondo l'uso islamico, un quadrato delle ombre e un quadrante. Lo strumento reca la data 496 dell'Egira (1102-1103 dell'età Cristiana) ed è firmato dal suo artefice, Muhammad 'Ibn Abi'l Qasim 'Ibn Bakran, del quale non si hanno notizie. Fu donato al Museo di Storia della Scienza dal Principe fiorentino Tommaso Corsini",
"This small astrolabe carries four tympanums for latitudes 24°/30°, 31°/35°, and 32°/36° (corresponding to Persia), and for latitude 0° (i. e. , the circle of the equator) and 66°. There is an alidade and a rete. The back of the mater displays a lunar calendar, in accordance with Islamic use, a shadow square, and a quadrant. The instrument is dated 496 of the Hegira (1102-1103 of the Christian era) and is signed by its maker, Muhammad 'Ibn Abi'l Qasim 'Ibn Bakran, on whom we have no information. Donated to the Museo di Storia della Scienza by the Florentine Prince Tommaso Corsini"
],
"creator" : [
"http://minerva.atcult.it/rdf/c5738e64-fb77-354a-8fc8-47164105b5f7",
"http://minerva.atcult.it/rdf/3fa79916-cb7f-3574-a3fb-589ca42ebf17"
],
"identifier" : "000000016002",
"issued" : "1102-1103",
"publisher" : "http://minerva.atcult.it/rdf/90310a84-1133-3356-bb3b-647ae1a7d14d",
"title" : "Astrolabio piano",
"numPages" : [
"1 astrolabio",
"1 astrolabe"
],
"placeOfPublication" : "Fattura araba",
"label" : "Astrolabio piano"
},

if you need to have in a result only elements of the #graph array that match the query (if title contains word Astrolabio), you can reach that with the following aggregation framework query:
db.items.aggregate([
{$match: {"#graph.title": /Astrolabio/}},
{$unwind: "$#graph"},
{$match: {"#graph.title": /Astrolabio/} },
{$group: {"_id": "$_id", "#graph": {"$push": "$#graph" } }}
]);
your regex {$regex: /Astrolabio$/} will return only documents with titles that have 'Astrolabio' as the last word is a sentence ("Astrolabio Piano" will not be included as 'Piano' is the last word here).

Related

How to apply different font weight to Strings?

From a webservice i'm getting a json where under the field "biografia" i'm getting a whole interview where Q&A are separated only by \n .
{
"biografia": "Stato civile: nubile\nPallavolo significa: tutta la mia vita\nUn difetto: mi piace molto dormire, potrei farlo tutto il giorno\nUn pregio: determinata\nLa gara più bella: Leningradka-Dinamo Mosca del 9 febbraio 2020\nLa gara da dimenticare: Nessuna; ogni partita è un’esperienza e le sconfitte ti lasciano errori su cui lavorare\nDedicherei una vittoria importante: a mia mamma, perché ha fatto e sta facendo tantissimo per me\nLibro preferito: mi piacciono romanzi e gialli\nPiatto preferito: Ratatouille\nHo scelto la pallavolo perché: mia mamma me lo fece provare quando avevo cinque anni ed è diventato la mia vita\nAdoro: il mio cane\nDetesto: lavare i piatti\nCanzone e cantante preferiti: amo la musica, ascolto diversi generi\nAuto ideale: Mercedes Benz\nSegno zodiacale: Scorpione\nIdolo sportivo: non ne ho; credo che se prendi esempio da qualcuno perdi la tua unicità e il tuo modo di giocare\nAllenatore più significativo: Vladimir Nikolaevich Merzlyakov\nCittà ideale: Mosca\nSogno nel cassetto: Top secret"},
What i need to achieve is a kind of interview where the questions are the strings before the colon and they should be bold, and the answers the other part.
As I said, each block is divided by \n
I don't know if it is possible to split them, modifying them by different font weight for questions and answers and put them all together in a single Text Widget.
Thanks for your help
You won't put it in a single Text widget, but you will put it in a RichText widget.
Split the output as you wish. There are a multitude of different split-questions here on StackOverflow.
Then you put it in a RichText widget with different TextSpan widgets as children.
From the official documentation. Code example:
RichText(
text: TextSpan(
text: 'Hello ',
style: DefaultTextStyle.of(context).style,
children: const <TextSpan>[
TextSpan(text: 'bold', style: TextStyle(fontWeight: FontWeight.bold)),
TextSpan(text: ' world!'),
],
),
)
Will produce a result as:

CSS formatting in Flutter

My app in flutter gets from API Text Html and some have a CSS Style.
But, I don't know how I can handle CSS in Flutter.
My API body example:
{
"id": "165517",
"prova_id": "27863318",
"materia_id": "697",
"tipo": "2",
"pergunta": "Considerando-se a Lei nº 9.394/96, que estabelece as diretrizes e bases da educação nacional, relacione a COLUNA II com a COLUNA I, associando os componentes da Educação Básica aos enunciados correspondentes.<br><br>COLUNA I<br><br><ol class=\"orderedlist\"><li class=\"insertorderedlist2-bold\">Educação Infantil</li><li class=\"insertorderedlist2-bold\">Ensino Fundamental</li><li class=\"insertorderedlist2-bold\">Ensino Médio</li></ol><br>COLUNA II<br><br><table class=\"table-richtext\"><tbody class=\"pcss-165517-12\"><tr><td class=\"pcss-165517-14\">( )</td><td>Possui duração de nove anos, é gratuito na escola pública e inicia-se aos seis anos de idade.</td></tr><tr><td>( )</td><td>A preparação básica para o trabalho e a cidadania do educando, para que continue aprendendo, de modo a ser capaz de se adaptar com flexibilidade a novas condições de ocupação ou aperfeiçoamento posteriores, é uma de suas finalidades.</td></tr><tr><td>( )</td><td>A avaliação é realizada por acompanhamento e registro do desenvolvimento das crianças, sem o objetivo de promoção.</td></tr><tr><td>( )</td><td>Os currículos incluirão, obrigatoriamente,o estudo da língua inglesa e poderão ofertar outras línguas estrangeiras, em caráter optativo.</td></tr><tr><td>( )</td><td>O Ensino Religioso, de matrícula facultativa,é parte integrante da formação básica do cidadão nessa etapa da Educação Básica.</td></tr><tr><td>( ) </td><td>Atendimento à criança deve ser realizado durante, no mínimo, quatro horas diárias para o turno parcial, e durante sete horas para a jornada integral.</td></tr></tbody></table><br>Assinale a sequência correta.",
"materia_desc": "Recursos Multifuncionais",
"texto_id": null,
"texto_assoc": null,
"alts": "[{\"id\": 713826, \"letra\": \"a\", \"conteudo\": \"2 2 1 3 3 1\"}, {\"id\": 713827, \"letra\": \"b\", \"conteudo\": \"1 2 3 2 1 3\"}, {\"id\": 713828, \"letra\": \"c\", \"conteudo\": \"3 2 1 1 3 2\"}, {\"id\": 713829, \"letra\": \"d\", \"conteudo\": \"2 3 1 3 2 1<br>\"}]",
My API results:
Large Space...
I use https://pub.dev/packages/flutter_html, but this pack don't support "CSS Attributes" =(
How is the best way to decode HTML with CSS attributes from API? any idea?
The css part might be parsable with https://pub.dev/packages/csslib.

Get parameter of a specific Simulink Block and compare it, Matlab

I'm parsing a text file with matlab which looks like this :
[Date]
2019-03-27 10:45:10.167618
[Component]
Component_Name : Manager principal
Component_ID : _ocl_MEu9Eemg_bhrv2HEbw
{Port}
Port_Name : FOP 1
Port_ID : _sZMXoEu9Eemg_bhrv2HEbw
Port_Type : Outgoing Port
[Component]
Component_Name : Manager 2
Component_ID : _r-HlMEu9Eemg_bhrv2HEbw
{Port}
Port_Name : FIP 1
Port_ID : _sZWIoku9Eemg_bhrv2HEbw
Port_Type : Incoming Port
[Link]
Link_Name : On/Off
Link_ID : _sZfSkku9Eemg_bhrv2HEbw
Link_Source_Name : Manager principal
Link_Source_ID : _ocl_MEu9Eemg_bhrv2HEbw
Link_Source_Port_Name : FOP 1
Link_Source_Port_ID : _sZMXoEu9Eemg_bhrv2HEbw
Link_Target_Name : Manager 2
Link_Target_ID : _r-HlMEu9Eemg_bhrv2HEbw
Link_Target_Port_Name : FIP 1
Link_Target_Port_ID : _sZWIoku9Eemg_bhrv2HEbw
I create a systeme for each [Component] i find and in each systems i create an input or output if the [Component] is a Source or a Target of a [Link].
In my text file example : On/Off is a link between 'Manager principal' and 'Manager 2'. So in the first System (Manager principal) i have an output called On/Off with a specific tag in tag description i set and in the second system (Manager 2) an input called On/Off with a specific tag in the Block tag i set.
So when i launch my code i have 2 system with 1 block in each system.
In this 2 blocks, if it's about the same link (in this example it is) we have this tag :
#_sZMXoEu9Eemg_bhrv2HEbw ==> #_sZWIoku9Eemg_bhrv2HEbw
The ID of the source port ==> the ID of the target port
This is what distinguish a Link than an other.
The context is : if the user change only the name of the Link for example Off/On instead of On/Off it must not create a new block because it's the same Link. So i would like to make a findBlocks() and for each blocks in the current system, i would like to do : if both ID's in tag description are same than in the text file so we just update the name of the block for example .
Here is the code where i create my blocks :
Update : I success to recover C which is the string inside Block tag.
B = find_system(sprintf('%s', component_NameValue));
C = get_param(find_system(sprintf('%s/%s', component_NameValue, link_NameValue)), 'Tag');
if (compareOut == 1) && (compareSource == 1) % Si c'est un port sortant et que c'est le port source du link
add_block('simulink/Ports & Subsystems/In1',[component_NameValue '/' link_NameValue]); % alors on ajoute un block Output de même nom que le link dans le système du composant que l'on parse
linkDescription = sprintf('Link : \n\n%s ==> %s \n\nComposant : \n\nDe : %s (%s) \nVers : %s (%s) \n\nPort Source : \n\n%s \n%s \n\n', link_NameValue , link_IDValue , link_SourceNameValue , link_SourceIDValue, link_TargetNameValue , link_TargetIDValue, link_SourcePortNameValue, link_SourcePortIDValue);
linkTag = sprintf('#%s ==> #%s', link_SourcePortIDValue, link_TargetPortIDValue);
set_param(gcb, 'Tag', linkTag);
set_param(gcb,'Description',linkDescription); % On ajoute une description au block contenant les infos du lien en question contenus dans le fichier texte
end
if (compareIn == 1) && (compareTarget == 1) % Si c'est un port entrant et que c'est le port target du link
add_block('simulink/Ports & Subsystems/Out1',[component_NameValue '/' link_NameValue]); % alors on ajoute un block Input de même nom que le link dans le système du composant que l'on parse
linkDescription = sprintf('Link : \n\n%s ==> %s \n\nComposant : \n\nDe : %s (%s) \nVers : %s (%s) \n\nPort Target : \n\n%s \n#%s', link_NameValue , link_IDValue , link_SourceNameValue , link_SourceIDValue, link_TargetNameValue , link_TargetIDValue,link_TargetPortNameValue, link_TargetPortIDValue);
linkTag = sprintf('#%s ==> #%s', link_SourcePortIDValue, link_TargetPortIDValue); %On ajoute un # devant l'ID du port pour pouvoir le retrouver et voir si un port à été modifié/rajouté/supprimé
set_param(gcb, 'Tag', linkTag);
set_param(gcb,'Description',linkDescription); % On ajoute une description au block contenant les infos du lien en question contenus dans le fichier texte
end
Thanks for helping in advance

MongoDB full text inconsistent results

I'm going deep into full-text search features and i'm finding some strange behaviors I cannot explain.
Here is a simple batch I run to setup my db for the test.
use MusicDB
db.songs.insertMany([{
"rank": 1000,
"authors": ["Pink Floyd"],
"title": [
{ "language": "en", "text": "Comfortably numb" },
{ "language": "it", "text": "Piacevolmente insensibile" }
],
"text": [
{ "language": "en", "text": "Hello, Is there anybody in there? Just nod if you can hear me Is there anyone at home? Come on now I hear you're feeling down I can ease your pain And get you on your feet again Relax I'll need some information first Just the basic facts Can you show me where it hurts There is no pain, you are receding A distant ship smoke on the horizon You are coming through in waves Your lips move but I can't hear what you're saying When I was a child I had a fever My hands felt just like two balloons Now I've got that feeling once again I can't explain, you would not understand This is now how I am I have become comfortably numb O.K. Just a little pin prick There'll be no more aaaaaaaah! But you may feel a little sick Can you stand up? I do belive it's working, good That'll keep you going through the show Come on it's time to go. There is no pain you are receding A distant ship smoke on the horizon You are only coming through in waves our lips move but I can't hear what you're saying When I was a child I caught a fleeting glimpse Out of the corner of my eye I turned to look but it was gone I cannot put my finger on it now The child is grown The dream is gone And I have become Comfortably numb."},
{ "language": "it", "text": "Coraggio, lo so che ti senti triste. Posso alleviare il tuo dolore e rimetterti di nuovo in piedi. Rilassati. Prima di tutto ho bisogno di sapere senza troppi dettagli dove ti fa male. Il dolore è sparito, stai guarendo Il fumo di una nave lontana all'orizzonte stai risalendo onda dopo onda. Le tue labbra si muovono, ma io non riesco a sentire quello che stai dicendo. Da bambino ho avuto la febbre, le mie mani erano gonfie come palloni. Adesso avverto di nuovo quella senzazione, non riesco a spiegartelo, non riusciresti a capire. Questo non sono io. Sto diventando piacevolmente insensibile. Va bene, solo una punturina, e non piangerai più. Ma può darsi che avrai un po' di nausea, Ce la fai a stare in piedi? Penso che stia funzionando, bene. Questo ti terrà in piedi per tutto lo spettacolo. Dai, è ora di andare. Il dolore è sparito, si sta allontanando. Il fumo di una nave lontana all'orizzonte Stai risalendo onda dopo onda. Le tue labbra si muovono, ma io non riesco a sentire quello che stai dicendo. Da bambino colsi con la coda dell'occhio un rapido movimento. Mi girai a guardare, ma era sparito, non riescii a capire cosa fosse, adesso il bambino è cresciuto, il sogno è finito. e io sono diventato piacevolmente insensibile."}
]
},
{
"rank": 999,
"authors": ["Led Zeppelin"],
"title": [
{ "language": "en", "text": "Stairway to Heaven" },
{ "language": "it", "text": "Scalinata per il paradiso" }
],
"text": [
{ "language": "en", "text": "There's a lady who's sure all that glitters is gold And she's buying a stairway to heaven. When she gets there she knows, if the stores are all closed With a word she can get what she came for. Ooh, ooh, and she's buying a stairway to heaven. There's a sign on the wall but she wants to be sure 'Cause you know sometimes words have two meanings. In a tree by the brook, there's a songbird who sings, Sometimes all of our thoughts are misgiven. Ooh, it makes me wonder, Ooh, it makes me wonder. There's a feeling I get when I look to the west, And my spirit is crying for leaving. In my thoughts I have seen rings of smoke through the trees, And the voices of those who standing looking. Ooh, it makes me wonder,Ooh, it really makes me wonder. And it's whispered that soon if we all call the tune Then the piper will lead us to reason. And a new day will dawn for those who stand long And the forests will echo with laughter. If there's a bustle in your hedgerow, don't be alarmed now, It's just a spring clean for the May queen. Yes, there are two paths you can go by, but in the long run There's still time to change the road you're on. And it makes me wonder. Your head is humming and it won't go, in case you don't know, The piper's calling you to join him, Dear lady, can you hear the wind blow, and did you know Your stairway lies on the whispering wind. And as we wind on down the road Our shadows taller than our soul. There walks a lady we all know Who shines white light and wants to show How ev'rything still turns to gold. And if you listen very hard The tune will come to you at last. When all are one and one is all To be a rock and not to roll. And she's buying a stairway to Heaven."},
{ "language": "it", "text": "C'è una donna che crede che tutto cio che luccica sia oro Ha intenzione di comprare una scala per raggiungere il Paradiso E quando vi arriva sa, se i negozi sono chiusi, con una parola può avere ciò per cui è venuta qui Ooh, ooh, e sta comprando una scala per il paradiso. C'è una scritta sul muro, ma lei vuole essere sicura Perchè, lo sai, a volte le parole hanni due significati Su un albero vicino al ponte, c'è un uccellino che canta A volte, tutti i nostri pensieri sono sospetti. Ooh, e mi domando, Ooh, e mi domando. Quella sensazione che provo quando guardo verso Ovest E la mia anima grida di partire Nei miei pensieri ho visto spirali di fumo tra gli alberi. E le voci di quelli che stanno a guardare Ooh, e mi fa pensare, Ooh, e mi fa pensare. E si mormora che presto, se tutti canteremo la melodia il pifferaio ci guiderà alla ragione e un nuovo giorno spunterà per quelli che stavano aspettando da tanto E le foreste eccheggeranno di risate. Se c'è una via vai sul tuo sentiero, non ti allarmare Sono solo i preparativi per la reginetta di Maggio Si, ci sono due strade che puoi percorrere, ma alla fine farai ancora tempo a cambiare il tuo percorso. E mi fa pensare La tua testa canitcchia e quella melodia non se ne andrà, nel caso non lo sapessi, Il pifferaio ti sta chiamando, vuole che tu vada da lui. Dolce donna, senti il vento soffiare e lo sapevi che la tua scala poggia sui sussurri del vento. E mentre scendiamo lungo la strada e le nostre ombre sono più alte della nostra anima Là cammina una signora che noi tutti conosciamo che fa splendere una luce bianca e vuol mostrarci come tutto continui a tramutarsi in oro. E se ascolti molto attentamente Prima o poi la melodia giungerà a te Quando tutti sono uno e una cosa sola è tutto essere una roccia ma senza rotolare. E sta comprando una scala verso il Paradiso."}
]
}]);
db.songs.createIndex({ "title.text": "text", "text.text": "text" })
Now please notice that the word "lady" appears only one time into the "en" text of the second record. Now I runs the following queries
db.songs.find({ "$text": { "$search": "lady", "$language": "it" }})
// no occurrences found
db.songs.find({ "$text": { "$search": "lady", "$language": "en" }})
// one occurrence found
db.songs.find({ "$text": { "$search": "lady", "$language": "none" }})
// no occurrences found
Unfortunately this does not match the documentation that say "language" field is only_ used for stemming so I figure that all the searches should return exactly one document.
"$search": "lady" with "$language": "en"
// "lady" is stemmed to "ladi" so this match "lady" and "ladies"
"$search": "lady" with "$language": "it"
// "lady" is stemmed exactly to "lady" so this match "lady"
"$search": "lady" with "$language": "none"
// "lady" is not stemmed but tokenization results in "lady" so this match "lady"
Can someone explain if I'm going wrong in creating the index of in reading the results?
Thanks.

iPhone : Complex CSV Parser

I'd like to parse a complex CSV file. I searched sources on the web but I only found readers for simple csv with coma and quote marks. But mine also contains "{", "[" and ":" in order to create groups, subgroups...
How can I retrieve a proper NSArray or a NSDictionary from this kind of csv ?
Or do you know a great (great !) csv reader/parser ?
Thanks !
Here is an example :
{"meta":{"code":200},"response":{"groups":[{"type":"nearby","name":"À
proximité","items":[{"id":"4bc88ad72f94d13aa9c5137f","name":"Métro
Chaussée d'Antin - La Fayette
[7,9]","contact":{},"location":{"address":"Métro
Chaussée d'Antin - La
Fayette","city":"Paris","state":"Île
de
France","postalCode":"75009","lat":48.872908,"lng":2.33325,"distance":39},"categories":[{"id":"4bf58dd8d48988d1fd931735","name":"Subways","icon":"http://foursquare.com/img/categories/travel/subway.png","parents":["Travel
Spots"],"primary":true}],"verified":false,"stats":{"checkinsCount":885,"usersCount":368},"hereNow":{"count":0}},{"id":"4ba8e508f964a520e4f739e3","name":"AdenClassifieds","contact":{},"location":{"address":"1-3
rue La
Fayette","city":"Paris","state":"France","postalCode":"75009","lat":48.8733461,"lng":2.3340489,"distance":50},"categories":[{"id":"4bf58dd8d48988d124941735","name":"Offices","icon":"http://foursquare.com/img/categories/building/default.png","parents":["Homes,
Work,
Others"],"primary":true}],"verified":false,"stats":{"checkinsCount":187,"usersCount":29},"hereNow":{"count":0}},{"id":"4c10cd34b4aeef3bad5afc0f","name":"AdenSourcing","contact":{},"location":{"address":"1,
rue La
Fayette","city":"Paris","state":"France","postalCode":"75009","lat":48.873009,"lng":2.333263,"distance":28},"categories":[{"id":"4bf58dd8d48988d125941735","name":"Tech
Startups","icon":"http://foursquare.com/img/categories/building/default.png","parents":["Homes,
Work,
Others","Offices"],"primary":true},{"id":"4bf58dd8d48988d174941735","name":"Coworking
Spaces","icon":"http://foursquare.com/img/categories/building/default.png","parents":["Homes,
Work,
Others","Offices"]}],"verified":false,"stats":{"checkinsCount":60,"usersCount":7},"hereNow":{"count":0}},{"id":"4b6d79c2f964a520f6762ce3","name":"Négatif+","contact":{},"location":{"address":"106
rue
lafayette","city":"Paris","state":"France","postalCode":"75010","lat":48.873035,"lng":2.333235,"distance":26},"categories":[{"id":"4bf58dd8d48988d1ff941735","name":"Miscellaneous
Shops","icon":"http://foursquare.com/img/categories/shops/default.png","parents":["Shops"],"primary":true}],"verified":false,"stats":{"checkinsCount":121,"usersCount":51},"hereNow":{"count":0}},{"id":"4beeb21a2c082d7f96b53042","name":"Sephora
Haussmann","contact":{},"location":{"address":"23
bd
Hausmann","city":"Paris","state":"Ile-de-France","lat":48.8728835,"lng":2.3334661,"distance":41},"categories":[{"id":"4bf58dd8d48988d10c951735","name":"Cosmetics
Shops","icon":"http://foursquare.com/img/categories/shops/beauty_cosmetic.png","parents":["Shops"],"primary":true}],"verified":false,"stats":{"checkinsCount":135,"usersCount":75},"hereNow":{"count":0}},{"id":"4af55e08f964a520f3f821e3","name":"Chez
Jean","contact":{},"location":{"address":"4
rue La
Fayette","city":"Paris","state":"France","postalCode":"75009","lat":48.8731558,"lng":2.3334978,"distance":13},"categories":[{"id":"4bf58dd8d48988d118951735","name":"Grocery
Stores","icon":"http://foursquare.com/img/categories/shops/food_grocery.png","parents":["Shops","Food and Drink
Shops"],"primary":true}],"verified":false,"stats":{"checkinsCount":46,"usersCount":27},"hereNow":{"count":0}},{"id":"4bee9a52e8c3c928dfd89892","name":"H&M","contact":{},"location":{"lat":48.872951,"lng":2.333551,"distance":35},"categories":[{"id":"4bf58dd8d48988d104951735","name":"Boutiques","icon":"http://foursquare.com/img/categories/shops/apparel.png","parents":["Shops","Clothing
Stores"],"primary":true}],"verified":false,"stats":{"checkinsCount":84,"usersCount":66},"hereNow":{"count":0}},{"id":"4b51d04df964a520865627e3","name":"Surcouf","contact":{},"location":{"address":"21,
bd
Haussmann","city":"Paris","state":"France","postalCode":"75009","lat":48.8728008,"lng":2.3339615,"distance":65},"categories":[{"id":"4bf58dd8d48988d122951735","name":"High
Tech
Outlets","icon":"http://foursquare.com/img/categories/shops/technology.png","parents":["Shops"],"primary":true}],"verified":false,"stats":{"checkinsCount":332,"usersCount":194},"hereNow":{"count":0}},{"id":"4b1e6795f964a5209a1924e3","name":"Le
Manoir","contact":{},"location":{"address":"34
Boulevard
Haussmann","city":"Paris","state":"France","postalCode":"75009","lat":48.872964707066394,"lng":2.334015369415283,"distance":56},"categories":[{"id":"4bf58dd8d48988d16d941735","name":"Cafés","icon":"http://foursquare.com/img/categories/food/cafe.png","parents":["Food"],"primary":true}],"verified":false,"stats":{"checkinsCount":116,"usersCount":61},"hereNow":{"count":0}},{"id":"4cb59ee81b0af04dca42ca25","name":"Casa
Del
Campo","contact":{},"location":{"address":"Rue
Lafayette","city":"Paris","state":"Ile-de-France","lat":48.873035,"lng":2.333235,"distance":26},"categories":[{"id":"4bf58dd8d48988d1db931735","name":"Tapas
Restaurants","icon":"http://foursquare.com/img/categories/food/default.png","parents":["Food"],"primary":true}],"verified":false,"stats":{"checkinsCount":12,"usersCount":11},"hereNow":{"count":0}},{"id":"4cdd43c0d5495481874446b2","name":"Thalys
Paris >
Bruxelles","contact":{},"location":{"address":"111
rue
Lafayette","city":"Paris","state":"Ile-de-France","postalCode":"75011","lat":48.873035,"lng":2.333235,"distance":26},"categories":[{"id":"4bf58dd8d48988d12a951735","name":"Trains","icon":"http://foursquare.com/img/categories/travel/trainstation.png","parents":["Travel
Spots","Train
Stations"],"primary":true}],"verified":false,"stats":{"checkinsCount":5,"usersCount":5},"hereNow":{"count":0}},{"id":"4ba3d477f964a520226438e3","name":"Les
Diamantaires","contact":{},"location":{"address":"60,
Rue
Lafayette","city":"Paris","state":"Ile-de-France","postalCode":"75009","lat":48.873035,"lng":2.333235,"distance":26},"categories":[{"id":"4bf58dd8d48988d115941735","name":"Middle
Eastern
Restaurants","icon":"http://foursquare.com/img/categories/food/middleeastern.png","parents":["Food"],"primary":true}],"verified":false,"stats":{"checkinsCount":11,"usersCount":10},"hereNow":{"count":0}},{"id":"4cbeb94297bc721e31158167","name":"Dentiste","contact":{},"location":{"address":"36
bd
haussmann","city":"Paris","state":"Ile-de-France","lat":48.8729985,"lng":2.3331688,"distance":31},"categories":[{"id":"4bf58dd8d48988d178941735","name":"Dentist's
Offices","icon":"http://foursquare.com/img/categories/building/medical_dentist.png","parents":["Homes,
Work, Others","Medical
Centers"],"primary":true}],"verified":false,"stats":{"checkinsCount":9,"usersCount":2},"hereNow":{"count":0}},{"id":"4c098514bbc676b0365c48d5","name":"Best
Place To Be
Naked","contact":{},"location":{"lat":48.872859,"lng":2.333289,"distance":43},"categories":[],"verified":false,"stats":{"checkinsCount":36,"usersCount":21},"hereNow":{"count":0}},{"id":"4bbc55912d9ea5937878a0ce","name":"Pizza
Tivoli","contact":{},"location":{"address":"5
rue La
Fayette","city":"Paris","state":"France","postalCode":"75009","lat":48.8733461,"lng":2.3340489,"distance":50},"categories":[{"id":"4bf58dd8d48988d110941735","name":"Italian
Restaurants","icon":"http://foursquare.com/img/categories/food/default.png","parents":["Food"],"primary":true}],"verified":false,"stats":{"checkinsCount":62,"usersCount":47},"hereNow":{"count":0}},{"id":"4be11bf20f03a593908e18b4","name":"Pole
Direction Nvx
Medias","contact":{},"location":{"lat":48.872878,"lng":2.333277,"distance":42},"categories":[],"verified":false,"stats":{"checkinsCount":25,"usersCount":6},"hereNow":{"count":0}},{"id":"4c17d044834e2d7f94f02780","name":"Josefin","contact":{},"location":{"city":"Paris","state":"Ile-de-France","lat":48.872863,"lng":2.333273,"distance":43},"categories":[{"id":"4bf58dd8d48988d10c941735","name":"French
Restaurants","icon":"http://foursquare.com/img/categories/food/default.png","parents":["Food"],"primary":true}],"verified":false,"stats":{"checkinsCount":14,"usersCount":8},"hereNow":{"count":0}},{"id":"4b597cfcf964a520e68928e3","name":"Siege
Danone","contact":{},"location":{"address":"17
boulevard
hausmann","city":"Paris","lat":48.873557,"lng":2.334042,"distance":59},"categories":[{"id":"4bf58dd8d48988d124941735","name":"Offices","icon":"http://foursquare.com/img/categories/building/default.png","parents":["Homes,
Work,
Others"],"primary":true}],"verified":false,"stats":{"checkinsCount":23,"usersCount":13},"hereNow":{"count":0}},{"id":"4c1f5058fcf8c9b6f66bae0b","name":"Obene","contact":{},"location":{"address":"35
rue saint
lazarre","city":"Paris","state":"Francr","postalCode":"75009","lat":48.872829,"lng":2.333201,"distance":48},"categories":[{"id":"4bf58dd8d48988d1c0941735","name":"Mediterranean
Restaurants","icon":"http://foursquare.com/img/categories/food/default.png","parents":["Food"],"primary":true}],"verified":false,"stats":{"checkinsCount":21,"usersCount":5},"hereNow":{"count":0}},{"id":"4d5133ac9ffc236a026720a7","name":"Sofa
Cafe
Studio","contact":{},"location":{"lat":48.873568,"lng":2.33384,"distance":48},"categories":[{"id":"4bf58dd8d48988d10c941735","name":"French
Restaurants","icon":"http://foursquare.com/img/categories/food/default.png","parents":["Food"],"primary":true}],"verified":false,"stats":{"checkinsCount":11,"usersCount":10},"hereNow":{"count":0}},{"id":"4cfa4adf2d80a1438a9f43d8","name":"Manucurist","contact":{},"location":{"address":"Rue
de la chausse d
antin","city":"Paris","state":"Ile-de-France","lat":48.87294352054596,"lng":2.333693504333496,"distance":41},"categories":[{"id":"4bf58dd8d48988d10c951735","name":"Cosmetics
Shops","icon":"http://foursquare.com/img/categories/shops/beauty_cosmetic.png","parents":["Shops"],"primary":true}],"verified":false,"stats":{"checkinsCount":28,"usersCount":4},"hereNow":{"count":0}},{"id":"4c7b90c9794e224bb48d6b28","name":"Le
Galfa - La
Fayette","contact":{},"location":{"lat":48.872853,"lng":2.333072,"distance":49},"categories":[{"id":"4bf58dd8d48988d10c941735","name":"French
Restaurants","icon":"http://foursquare.com/img/categories/food/default.png","parents":["Food"],"primary":true}],"verified":false,"stats":{"checkinsCount":20,"usersCount":15},"hereNow":{"count":0}},{"id":"4c124b6377cea59338bccc60","name":"Noon","contact":{},"location":{"address":"Rue
de la chaussee d
antin","city":"Paris","state":"Ile-de-France","lat":48.8736428,"lng":2.3330026,"distance":51},"categories":[{"id":"4bf58dd8d48988d146941735","name":"Delis
or
Bodegas","icon":"http://foursquare.com/img/categories/food/deli.png","parents":["Food"],"primary":true}],"verified":false,"stats":{"checkinsCount":15,"usersCount":12},"hereNow":{"count":0}},{"id":"4bb2f78ea32876b0173a01fe","name":"Glam
Media France (temp
Offices)","contact":{},"location":{"address":"21
bd
Haussman","city":"Paris","lat":48.87305,"lng":2.333831,"distance":39},"categories":[{"id":"4bf58dd8d48988d125941735","name":"Tech
Startups","icon":"http://foursquare.com/img/categories/building/default.png","parents":["Homes,
Work,
Others","Offices"],"primary":true}],"verified":false,"stats":{"checkinsCount":7,"usersCount":4},"hereNow":{"count":0}},{"id":"4c122cd7583c9c74bf323fa4","name":"Havaianas
welcomes Summer # Galeries
Lafayette","contact":{"phone":"0142823456","twitter":"havaianaseurope"},"location":{"address":"40
boulevard Haussmann","city":"75009
Paris","state":"France","country":"France","lat":48.8731566,"lng":2.3327878,"distance":44},"categories":[{"id":"4bf58dd8d48988d107951735","name":"Shoe
Stores","icon":"http://foursquare.com/img/categories/shops/apparel.png","parents":["Shops","Clothing
Stores"],"primary":true}],"verified":true,"stats":{"checkinsCount":11,"usersCount":9},"hereNow":{"count":0}},{"id":"4b9a40c4f964a52081a735e3","name":"little
georgette","contact":{},"location":{"lat":48.872544,"lng":2.33322,"distance":79},"categories":[{"id":"4bf58dd8d48988d10c941735","name":"French
Restaurants","icon":"http://foursquare.com/img/categories/food/default.png","parents":["Food"],"primary":true}],"verified":false,"stats":{"checkinsCount":60,"usersCount":41},"hereNow":{"count":0}},{"id":"4c319736213c2d7f5e33345d","name":"Isiom","contact":{},"location":{"lat":48.872815,"lng":2.333228,"distance":49},"categories":[{"id":"4bf58dd8d48988d124941735","name":"Offices","icon":"http://foursquare.com/img/categories/building/default.png","parents":["Homes,
Work,
Others"],"primary":true}],"verified":false,"stats":{"checkinsCount":7,"usersCount":2},"hereNow":{"count":0}},{"id":"4c89f5e49ef0224b0595567b","name":"Cardiweb","contact":{},"location":{"city":"Paris","state":"Ile-de-France","lat":48.873727,"lng":2.33362,"distance":55},"categories":[{"id":"4bf58dd8d48988d124941735","name":"Offices","icon":"http://foursquare.com/img/categories/building/default.png","parents":["Homes,
Work,
Others"],"primary":true}],"verified":false,"stats":{"checkinsCount":5,"usersCount":3},"hereNow":{"count":0}},{"id":"4c507cf7991c20a18e014786","name":"Focus
Groups","contact":{},"location":{"lat":48.872982,"lng":2.33353,"distance":31},"categories":[{"id":"4bf58dd8d48988d124941735","name":"Offices","icon":"http://foursquare.com/img/categories/building/default.png","parents":["Homes,
Work,
Others"],"primary":true}],"verified":false,"stats":{"checkinsCount":1,"usersCount":1},"hereNow":{"count":0}}]}]}}
That looks like JSON, not CSV. Use this JSON Framework to parse the file: http://code.google.com/p/json-framework/