- consumer_key(Key:text)[multifile]
- Add a clause to this predicate to specify your Semantria
API "consumer key".
- secret_key_md5(MD5:text)[multifile]
- Add a clause to this predicate to specify the MD5 hash of your
Semantria API "secret key". The hash should use lower case
hexadecimal encoding.
This hack is necessary because SWI Prolog doesn't seem to have a good
MD5 implementation. Run `md5sum $secret_key` at a command prompt to
get the value you need.
- process_document(+Document:string, -Response:dict)
- Queue Document for processing and block until a Response is
available. This predicate is a synchronous convenience on
top of Semantria's asynchronous API.
A document ID is generated based on the
document's content. Calling process_document/2 on a document that
has already been processed returns immediately (using results cached
on Semantria's server).
- queue_document(+Document:string, ?Id:string) is det
- Add Document to Semantria's queue for processing. If Id is ground,
use that as the document's Id; otherwise, bind Id to a unique
identifier for Document. Generated identifiers are guaranteed to be
stable across invocations.
- request_document(+Id:string, -Response:dict)
- Request details about an already-queued document with Id. This
predicate is usually called after calling queue_document/2.
Undocumented predicates
The following predicates are exported, but not or incorrectly documented.
- request(Arg1, Arg2, Arg3)