jcharis / natural-language-processing-tutorials Goto Github PK
View Code? Open in Web Editor NEWNatural Language Processing Tutorials(NLP) with Julia and Python
Natural Language Processing Tutorials(NLP) with Julia and Python
Hi!
@plac.annotations cell gives me this error:
File "<ipython-input-293-72f554ad94b1>", line 5 n_iter=("Number of training iterations", "option", "n", int)) ^ SyntaxError: unexpected EOF while parsing
Any suggestion why? I'm using Python 3.
The README mentions some TextSummarization.jl
for Julia but there is no such file in the repo.
Hello,
I need a help please , I've installed all the dependencies spacy and i've done the same thing as the tuto but stil have this Error
Exception: Not all required packages are installed. To use this pipeline, you need to install the missing dependencies. Please install spacy
When i run the code I get following output
docx = nlp(u"I am looking for an Italian Restaurant where I can eat")
for word in docx.ents:
print("value",word.text,"entity",word.label_,"start",word.start_char,"end",word.end_char)
('value', u'Italian', 'entity', u'NORP', 'start', 20, 'end', 27)
print(interpreter.parse(u"I am looking for an Italian Restaurant where I can eat"))
{u'entities': [], u'intent': {u'confidence': '0.7245936400661538', u'name': u'restaurant_search'}, 'text': u'I am looking for an Italian Restaurant where I can eat', u'intent_ranking': [{u'confidence': '0.7245936400661538', u'name': u'restaurant_search'}, {u'confidence': '0.16613318075824324', u'name': u'affirm'}, {u'confidence': '0.061131622985489784', u'name': u'greet'}, {u'confidence': '0.04814155619011318', u'name': u'goodbye'}]}
print(interpreter.parse(u"I want an African Spot to eat"))
{u'entities': [], u'intent': {u'confidence': '0.6742354477482855', u'name': u'restaurant_search'}, 'text': u'I want an African Spot to eat', u'intent_ranking': [{u'confidence': '0.6742354477482855', u'name': u'restaurant_search'}, {u'confidence': '0.12795773626363155', u'name': u'affirm'}, {u'confidence': '0.1248807660919913', u'name': u'goodbye'}, {u'confidence': '0.07292604989609185', u'name': u'greet'}]}
print(interpreter.parse(u"Good morning World"))
{u'entities': [], u'intent': {u'confidence': '0.3928691488396195', u'name': u'greet'}, 'text': u'Good morning World', u'intent_ranking': [{u'confidence': '0.3928691488396195', u'name': u'greet'}, {u'confidence': '0.2737002194915276', u'name': u'goodbye'}, {u'confidence': '0.17752522806694152', u'name': u'affirm'}, {u'confidence': '0.15590540360191174', u'name': u'restaurant_search'}]}
Below is the full code :
from rasa_nlu.training_data import load_data
from rasa_nlu.config import RasaNLUModelConfig
from rasa_nlu.model import Trainer
from rasa_nlu import config
train_data = load_data('./data/data.json')
trainer = Trainer(config.load("config.yaml"))
trainer.train(train_data)
model_directory = trainer.persist('./projects/')
import spacy
nlp = spacy.load('en')
docx = nlp(u"I am looking for an Italian Restaurant where I can eat")
for word in docx.ents:
print("value",word.text,"entity",word.label_,"start",word.start_char,"end",word.end_char)
from rasa_nlu.model import Metadata, Interpreter
interpreter = Interpreter.load(model_directory)
print(interpreter.parse(u"I am looking for an Italian Restaurant where I can eat"))
print(interpreter.parse(u"I want an African Spot to eat"))
print(interpreter.parse(u"Good morning World"))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.