Skip to content

tc-teams/fakefinder-pln

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Natural language processing

To start developing

Para utilizar do ambiente:

pip3 install virtualenv
virtualenv venv

Tools for the environment

Para configurar as ferramentas:

pip3 install -U flask

Run Template

Template one

Para executar um modulo de template

Utilizar somente quando não tiver uma função associada
export FLASK_APP={{PATH:module}}
export FLASK_ENV=development
flask run

http://localhost:5000/

Template two

Para executar um modulo de template

python3 sample.py runserver

http://localhost:5000/

Docker Usage


docker build -t gcloud/fakefinder-pln:1.0.0 .
docker run -d -p 80:80 --name pln -t gcloud/fakefinder-pln:1.0.0 
docker logs pln --follow

Exemplos

from nltk.tokenize import sent_tokenize
text = "God is Great! I won a lottery."
print(sent_tokenize(text))

Output: ['God is Great!', 'I won a lottery ']

Container local

Change $PWD ----> /code/nlp/bow

Curl

request:
curl -X POST -d '{"description":"ola mundo, tudo bom","news":["ola mundo","ola"]}' http://localhost:5000/ -H "Content-Type:application/json" 

response:
{"description": "ola mundo, tudo bom", "pln-process": {"ola mundo": "0.6666666666666666", "ola": "0.4"}}

References

virtualenv sumarização

Contributing

License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published