- python 3.5.2
- nltk 3.0
- nlpnet-1.2.1
keep pip upgraded. (last version used: pip 8.1.2-1)
$ pip install -U pip
$ sudo pip install -U nltk
$ pip install setuptools
Close and reopen terminal then type:
$ pip install numpy
$ pip install nlpnet
-> with nodejs API to comunicate with the elasticsearch
Instalation of the websystem as a archlinux (general instructions, also applies for other linux alike systems)
install npm
pacman -S npm
install nodeversion manager to install node 6.11.0. Should work with version above too
for more info about the node version manager: github.com/tj/n
npm install -g n
install node 6.11.0
n 6.11.0
check if version was installed by typing 'n' at your terminal
n
Go to the folder elastic_node
cd ./Siri-Law-Br/elastic_node
Run the server
node index.js
server will start at the port localhost:8081 as default now just open the address at your browser (localhost:8081). When typing anything at the search field, make sure that u have internet connection and your local elasticsearch is running.
Pre-requisite: java 8 runtime enviroment (jre8-openjdk) Download elastic search and unzip the archive anywhere. Currently using 5.0.0
- https://www.elastic.co/downloads/elasticsearch
- https://www.elastic.co/downloads/past-releases/elasticsearch-5-0-0
Configure the elastic search to acc request from the same server. Go to config folder, open elasticsearch.yml. makesure the network.host has 'localhost' as value and 'http.port' has a different port(9200 for example) from the websystem (8081). Now add the last three lines that will make elasticsearch to receive and send request from the same server.
Add at the end of file.
http.cors.enabled: true
http.cors.allow-origin: "/.*/"
http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, Authorization, Access-Control-Allow-Origin"
your file will look like this:
network.host: localhost
http.port: 9200
...
http.cors.enabled: true
http.cors.allow-origin: "/.*/"
http.cors.allow-headers: "X-Requested-With, Content-Type, Content-Length, Authorization, Access-Control-Allow-Origin"
Enter the folder and execute elasticsearch
./bin/elasticsearch
If you dont have the elastic search indexed with cdc already. Check this link below. It has the default structure to make the web system works. https://github.com/dnovaes/Siri-Law-Br/blob/master/elastic_node/indexing_es.md
#Links for consultation of POS tags. (Brill POS Tagger)
- https://www.researchgate.net/figure/228659355_tbl2_Table-5-Part-of-speech-tags-assigned-by-the-Brill-POS-Tagger
- https://cs.nyu.edu/grishman/jet/guide/PennPOS.html
Initial screen of the web system.