Skip to content

luizfan/nlp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Analyze Text(PT-BR) with Python3 and NLTK

Code made for presentation of FCamara meetup

Installation

Use the package manager pip to install foobar.

pip install flask
pip install nltk
pip install pyyaml
pip install unicodedata

Open your python console and run it

import nltk
nltk.download('rslp')
nltk.download('punkt')

Run

Run server.py script

py server.py

Routes

Obs: The default port is 8081, but can be changed in code in server.py

GET /
Returns application status

Train the algorithm with phrases from code samples

GET /train

Train the algorithm with some sent phrase.

POST /train
body:
   phrase:'type something here'
   class: 'phrase class'

Returns class with higher matching and your score

GET /classify
body:
   phrase:'write something to be classified'

Talk to the robot

GET /chat
body:
   phrase:'write something'

teach the algorithm new answers

POST /answer
body:
   answer:'type something here'
   class: 'answer class'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages