-
Notifications
You must be signed in to change notification settings - Fork 1
Api 4steps
This guide is for impatients, so here you have all the information to add documents and explore them quickly. Let's go!
Or use the authorization token if user was already created:
curl -i -X POST -d "{ 'email': '[email protected]'}" http://localhost/api/users
We have the documents packed in a zip file in dropbox or in a ftp server or in a shared folder in LAN. So, you need to create a new source
with that url:
curl -i -X POST -H "Authorization: 70b88ce0-9cb8-23e5-62dd-0002a4d3c52c" -d "{ 'name': 'myFirstSource', 'url':'https://dl.dropboxusercontent.com/u/111111/corpus.zip'}" http://zavijava.dia.fi.upm.es:8888/api/sources
At this point, both a hoarder and a harvester task will be initialized to download and to extract the file adding the inner documents
in the system.
At the same time or after, we can create a domain
with all the documents
downloaded from that source
:
curl -i -X POST -H "Authorization: 70b88ce0-9cb8-23e5-62dd-0002a4d3c52c" -d "{'name':'myFirstDomain', 'documents': { 'source': { 'name' : 'myFirstSource'}}" http://zavijava.dia.fi.upm.es:8888/api/domains
This domain is dynamic, i.e. when new documents are added from myFirstSource, they also are included in myFirstDomain.
Well, the domain must be closed to be analyzed (See Domain States). This is an automatic task done when no new documents have been added to a domain
for a time (about 20 minutes). However, if you know the number of documents to add, you can close it as soon as all of them are added.
First, check how many of them have been added to the domain
in a time:
curl -i -X GET -H "Authorization: 70b88ce0-9cb8-23e5-62dd-0002a4d3c52c" http://zavijava.dia.fi.upm.es:8888/api/domains/myFirstDomain?fields=size
And, when it will be complete, close it:
curl -i -X PUT -H "Authorization: 70b88ce0-9cb8-23e5-62dd-0002a4d3c52c" -d "{'status':'close'}" http://zavijava.dia.fi.upm.es:8888/api/domains/myFirstDomain/status
When the system perform the analyzing and learning tasks, you'll can to check the entities
, models
, terms
, relations
and more elements in that domain
.
See some of the common searches to be inspired.
work supported by the European Community's Seventh Framework Programme (FP7-ICT-2013-8.1) under grant agreement no: 611383. For further information please see http://DrInventor.eu