Using CLAVIN-REST

138 views
Skip to first unread message

Alexandru M Florea

unread,
Mar 16, 2015, 8:06:38 PM3/16/15
to clavin...@googlegroups.com
Hello,

I am a third year student and I am trying to use CLAVIN REST for my final year project (a Google Chrome extension to display a map of all the locations present in the webpage the user is viewing), yet I ran into some issues and I hoped you could help.

I first tried to install CLAVIN, but just like another user that posted here some time ago, I kept getting this error: 

"MAVEN_OPTS" is not recognized as an internal or external command, operable program or batch file at step 6 "Create the Lucene Index (this one-time process will take several minutes):MAVEN_OPTS="-Xmx2048M" mvn exec:java -Dexec.mainClass="com.bericotech.clavin.index.IndexDirectoryBuilder".

I eventually abandoned the idea and decided to use CLAVIN-REST, following the steps described at https://github.com/Berico-Technologies/CLAVIN-rest :
  • Downloaded the code zip file and extracted it.
  • Downloaded the REST server
  • Downloaded and unzipped Geonames
  • Downloaded the yaml configuration file 
  • Tried to create the CLAVIN gazeteer, with java -Xmx4096m -jar clavin-rest.jar index clavin-rest.yml
     
    but I kept getting "Error: Invalid or corrupt jarfile clavin-rest.jar" so I used this file https://github.com/tlpinney/CLAVIN-rest/releases/download/0.2.0/clavin-rest-0.2.0.jar instead, as suggested by Travis Pinney in another topic. It did the trick, but it had some errors, as seen in the attached "errors" screenshot.
  • I ran the server, but it returns nothing even when using the "Somalia-doc.txt" file given as an example, although it does receive my requests, as seen in the "results" image.

I really need to get it running but I am not sure what I am doing wrong, so any ideas/suggestions would be greatly appreciated. Thanks!

Best regards,
Alex Florea 

errors.png
results.png

Patrick Pierson

unread,
Mar 18, 2015, 7:31:36 AM3/18/15
to Alexandru M Florea, clavin...@googlegroups.com
If you go to http://localhost:9090 in your browser do you see a fairly basic ui?


Very Respectfully,
     Patrick Pierson
     Lead Systems Engineer
     AWS Certified Sysops Administrator
     Cell: 301-466-7559
    

--
You received this message because you are subscribed to the Google Groups "clavin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clavin-users...@googlegroups.com.
To post to this group, send email to clavin...@googlegroups.com.
Visit this group at http://groups.google.com/group/clavin-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/clavin-users/ac2361b0-41da-47d2-9445-2371dee7b70d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alexandru M Florea

unread,
Mar 18, 2015, 9:28:15 AM3/18/15
to clavin...@googlegroups.com, amfl...@sheffield.ac.uk
Hi,

Thank you for your response. Yes, I get a basic UI with a text area, a map window and a results area (see attached screenshot). The menu links are not working, but that's ok. What was wrong with the previous commands then? Is it only intended to be used through the UI?

Also, just to be sure, is any other set-up necessary? I am asking because I got some unexpected results, such as getting a result from Australia when entering "Mount Everest" (there is indeed a place with the same name there, but I would have expected it to return the most well known one), as well as the example in the screenshot.

Regards,

Alex Florea
screenshot1.PNG

Patrick Pierson

unread,
Mar 18, 2015, 11:02:54 AM3/18/15
to Alexandru M Florea, clavin...@googlegroups.com
Alex,
   Sorry I reread your previous email and I believe you had issues building the Index correct?  I have found that if there is any issues with Index creation it was best for me to rebuild it until there was none (aside from a single error at the end related to formatting).

Clavin-rest can definitly be used via commandline/curl/api interface and not via the UI, I was just pointing that out for reference to test that it was indeed "up".

Lastly there does look to be a Mount Everest in Australia but as far as I understand the inner workings of Clavin it will report any location it finds in the Index.  Anyone else chime in please if I am mistaken. 

Alexandru M Florea

unread,
Mar 18, 2015, 11:43:13 AM3/18/15
to clavin...@googlegroups.com, amfl...@sheffield.ac.uk
Hi,

When creating the index I get an error related to some invalid syntax at around line 900.000 which is skipped and then many errors related to duplicate admin keys for some GeoNames entries, as you can see in the errors.png screenshot attached to my first post. I tried to re-run this several times but nothing changed, so how can I try and fix this?

Also, can I get some example syntax for sending requests to the server via the GET and POST api? I just want to make sure there is no syntax issue. In this screenshot you can see in the window on the right what I've tried so far.

In terms of disambiguation, as far as i know Clavin takes other things into consideration when deciding which one the text refers to, out of several places with the same name. For example, the Paris in Texas, USA is less likely to be referred to than Paris, France which is more populous. However, does that mean that Paris, Texas will never be chosen? In the screenshot above I tried "Stuff happened in Paris,Texas" (which is pretty straightforward if you ask me) and it was taken as two separate entities, one being Paris, France and the other Texas, USA.

Thank you for your quick answer.


Regards,

Alex Florea









Patrick Pierson

unread,
Mar 18, 2015, 6:04:37 PM3/18/15
to Alexandru M Florea, clavin...@googlegroups.com
I believe the error at 900,000 and the duplicate key names are nothing we can help unless we massage the geonames txt file before creating the index. 

I just went through the steps, here are the commands I ran that gave me the correct geotagged output for the Somalia doc:

java -Xmx4096m -jar clavin-rest.jar index clavin-rest.yml
java -Xmx2048m -jar clavin-rest.jar server clavin-rest.yml 




Very Respectfully,
     Patrick Pierson
     Lead Systems Engineer
     AWS Certified Sysops Administrator
     Cell: 301-466-7559
    

--
You received this message because you are subscribed to the Google Groups "clavin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clavin-users...@googlegroups.com.
To post to this group, send email to clavin...@googlegroups.com.
Visit this group at http://groups.google.com/group/clavin-users.
Reply all
Reply to author
Forward
0 new messages