Hi Rupert, Indeed, this seems to be the reason, might be something with the Windows curl implementation(?). When I save the text in the file and execute the command, it seems to work as expected: I tried also to save it as both windows-1252 and utf-8 and set the charset in the request. But when I send it as a string, it returns something spurious independently on whether i specify the charset or which one i choose.
Thanks a lot for your help! Best regards, Andriy On Thu, Nov 15, 2012 at 2:35 PM, Rupert Westenthaler < [email protected]> wrote: > Hi Andriy > > So if our result differ from each other, than it is likely that the > reason for your issue is the charset use by the command. > > Can you please try to copy the text into a {file} and than use > > curl -v -X POST -H "Accept: text/turtle" -H \ > "Content-type: text/plain" --data "@{file}" \ > http://dev.iks-project.eu:8080/enhancer/chain/dbpedia-spotlight > > if the file does not use UTF-8 you will need to parse the charset in > the Content-type header > > Content-type: text/plain;charset={charset} > > best > Rupert > > On Thu, Nov 15, 2012 at 2:08 PM, Andriy Nikolov > <[email protected]> wrote: > > Hi Rupert, > > > > Thanks a lot for your reply. > > Actually, when I try it with http://dev.iks-project.eu:8080, I still > get the > > same effect: the output I get when submitting through the web interface > and > > via the API (I used the command from your mail) are different: > > in one case (using the web form), there is a mention of > > <http://dbpedia.org/resource/Albrecht_von_Wallenstein> (correct), while > via > > the API there isn't, but there is a mention of > > http://dbpedia.org/resource/Clavichord (wrong). > > > > Best regards, > > Andriy > > > > > > On Wed, Nov 14, 2012 at 6:50 PM, Rupert Westenthaler > > <[email protected]> wrote: > >> > >> Hi > >> > >> When I send your request to http://dev.iks-project.eu:8080 I do get > >> the expected results. > >> Can you please try the same. > >> > >> If you do not get those results than it has most likely todo with the > >> charset used by the terminal. The command you sent does not explicitly > >> set the charset so Stanbol will interpret it as "UTF-8" when parsing > >> the request. > >> > >> I used the following command > >> > >> curl -i -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" > >> --data \ > >> "üä Albrecht Václav Eusebius z Valdštejna and pe fights, leading to his > \ > >> imprisonment in town prison.[8] Already in February 1600,[8] Albrecht > left > >> \ > >> Altdorf for his Grand Tour through the HRE, France and Italy,[10] where > he > >> \ > >> studied at the universities of Bologna and Padua." \ > >> http://dev.iks-project.eu:8080/enhancer/chain/dbpedia-spotlight > >> > >> best > >> Rupert > >> > >> On Wed, Nov 14, 2012 at 5:03 PM, Andriy Nikolov > >> <[email protected]> wrote: > >> > Dear all, > >> > > >> > I am working at fluid Operations AG on one of the IKS Early Adopters > >> > projects and trying to integrate Stanbol with our Information > Workbench > >> > platform. > >> > > >> > Currently I am getting to know the Stanbol API, and I have a question > >> > related to the dbpedia-spotlight enhancement chain. > >> > I am trying to retrieve annotations via the REST interface, but I > face a > >> > problem as the output I receive is different from the one I obtain via > >> > the > >> > web interface form. > >> > Do you know what can be the possible cause and how to deal with it? > >> > (possibly, it happens when sending input text with non-standard > >> > characters). > >> > > >> > As an example, I am trying to send the following string (it is > >> > meaningless, > >> > just that it contains non-standard chars and mentions of different > >> > entity > >> > types): > >> > > >> > üä Albrecht Václav Eusebius z Valdštejna and pe fights, leading to his > >> > imprisonment in town prison.[8] Already in February 1600,[8] Albrecht > >> > left > >> > Altdorf for his Grand Tour through the HRE, France and Italy,[10] > where > >> > he > >> > studied at the universities of Bologna and Padua. > >> > > >> > When sending it via the web interface > >> > http://localhost:8080/enhancer/chain/dbpedia-spotlight, > >> > I retrieve a list of text and entity annotations, particularly the one > >> > mentioning the entity dbpedia:Albrecht_von_Wallenstein (the > annotations > >> > are > >> > consistent with what I get from the dbpedia-spotlight demo service > >> > itself). > >> > > >> > However, when trying to send the same text via the API, e.g., with the > >> > following command: > >> > > >> > curl -X POST -H "Accept: text/turtle" -H "Content-type: text/plain" > >> > --data > >> > "üä Albrecht Václav Eusebius z Valdštejna and pe fights, leading to > his > >> > imprisonment in town prison.[8] Already in February 1600,[8] Albrecht > >> > left > >> > Altdorf for his Grand Tour through the HRE, France and Italy,[10] > where > >> > he > >> > studied at the universities of Bologna and Padua." > >> > http://localhost:8080/enhancer/chain/dbpedia-spotlight > >> > > >> > I get a different set of annotations: particularly, there is no > mention > >> > of > >> > dbpedia:Albrecht_von_Wallenstein, but there is a reference to > >> > dbpedia:Clavichord (extracted from the part "clav" of the name > >> > "Václav"). > >> > > >> > Do you know what can be the reason for this problem? Are there any > >> > additional request parameters which has to be set? > >> > > >> > Thank you! > >> > > >> > Best regards, > >> > Andriy Nikolov > >> > >> > >> > >> -- > >> | Rupert Westenthaler [email protected] > >> | Bodenlehenstraße 11 ++43-699-11108907 > >> | A-5500 Bischofshofen > > > > > > > > > > -- > > > > Dr Andriy Nikolov > > > > R&D Engineer > > > > F +49 6227 3849-565 > > > > [email protected] > > > > http://www.fluidops.com > > > > fluid Operations AG > > > > Altrottstr. 31 > > > > 69190 Walldorf, Germany > > > > Geschäftsführer/Managing Directors: Vasu Chandrasekhara, Dr. Andreas > > Eberhart, Dr. Stefan Kraus, Dr. Ulrich Walther > > > > Beirat/Advisory Board: Prof. Dr. Andreas Reuter, Thomas Reinhart > > > > Registergericht/Commercial Register: Mannheim, HRB 704027 > > > > USt-Id Nr./VAT-No.: DE258759786 > > > > This e-mail may contain confidential and/or privileged information. If > you > > are not the intended recipient (or have received this e-mail in error) > > please notify the sender immediately and destroy this e-mail. Any > > unauthorised copying, disclosure or distribution of the material in this > > e-mail is strictly forbidden. > > > > > > > > > > -- > | Rupert Westenthaler [email protected] > | Bodenlehenstraße 11 ++43-699-11108907 > | A-5500 Bischofshofen > -- *Dr Andriy Nikolov * *R&D Engineer* F +49 6227 3849-565 [email protected]<https://deepinsight:50443/int/resource/[email protected]> http://www.fluidops.com *fluid Operations AG* Altrottstr. 31 69190 Walldorf, Germany Geschäftsführer/Managing Directors: Vasu Chandrasekhara, Dr. Andreas Eberhart, Dr. Stefan Kraus, Dr. Ulrich Walther Beirat/Advisory Board: Prof. Dr. Andreas Reuter, Thomas Reinhart Registergericht/Commercial Register: Mannheim, HRB 704027 USt-Id Nr./VAT-No.: DE258759786 This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
