A research project to learn, index, and display all lexical information.
You have to clone the following repositories as a pre-requisite:
$ git clone [email protected]:stanfordnlp/phrasal.git
$ git clone [email protected]:stanfordnlp/CoreNLP.git
$ git clone [email protected]:oscii-lab/Word2VecJava.git
- Run
gradle test
to build and testlex
.
- Run
gradle idea
to create project files.
The lexicon uses PanLex data as a seed. To run the system,
- download a
JSON
-formatted archive of PanLex data. - To compile a lexicon as a
lex.json
file, executegradle :run -Pargs="-p /path/to/panlex/directory -w /path/to/lex.json"
- To serve the lexicon and a corpus over
http
, executegradle :run -Pargs="-r /path/to/lex.json -c /path/to/corpus/prefix -a"
The lexicon is currently served from: http://104.197.10.176/translate/lexicon
The structure of a request object is defined in org.oscii.api.Protocol.Request
.
Responses are served in two ways:
- Over http in response to a JSON request body
- Over http in response to request parameters defining the fields of a request
For example, the following request returns translations, definitions, and extensions for the word "drive".
http://104.197.10.176/translate/lexicon?query=drive&source=en&target=es&translate=true&extend=true&define=true