Comments (26)
I'll try to look into this bug tomorrow, but in the meantime -> if you're interested in submitting a diverse name-list for the UK we'd welcome any PR π
from rasalit.
Fantastic. I'll try it out and let you know.
from rasalit.
@koaning I have used the latest build but get the same error when using Spacy
Error.txt
from rasalit.
Interesting!
From what paths are you running this? If your root has a file named custom_components.py
that contains a class SimpleNameExtractor
I think it should work. Could you confirm the paths? Just want to check that before I start investigating.
Also, and this is more of a curiosity, what does your SimpleNameExtractor
component do?
from rasalit.
I'm running this in my project folder where I have a custom_components.py
. The SimpleNameExtractor class has some unsophisticated code to extract names from an utterance e.g. 'My name is X' and so on.
Just to test, I copied custom_components.py
into the rasalit lib folder , using:
sudo cp custom_components.py /usr/local/lib/python3.6/dist-packages/rasalit/apps/livenlu/
This isn't a great solution, but it works for now! It would be good to know if there's another way I can point it.
from rasalit.
Now I'm getting this error in place: InvalidModelError: Model 'en_core_web_sm' is not a linked spaCy model. Please download and/or link a spaCy model, e.g. by running: python -m spacy download en_core_web_md python -m spacy link en_core_web_md en
any chance it's related? I've tried following the advice.
from rasalit.
Ah, I see it asks for en_core_web_sm
and it recommends downloading and linking en_core_web_md
instead. I've now gone for
python -m spacy download en_core_web_sm; python -m spacy link en_core_web_sm en
I've overcome that error, and it appears to have helped.
I can provide input to Text Input for Model
- but I always get this now:
TypeError: 'NoneType' object is not callable
Traceback:
File "/usr/local/lib/python3.6/dist-packages/streamlit/script_runner.py", line 332, in _run_script
exec(code, module.__dict__)
File "/usr/local/lib/python3.6/dist-packages/rasalit/apps/livenlu/app.py", line 32, in <module>
interpreter=interpreter, text_input=text_input
File "/usr/local/lib/python3.6/dist-packages/rasalit/apps/livenlu/common.py", line 29, in fetch_info_from_message
element.process(msg)
File "/usr/local/lib/python3.6/dist-packages/rasa/nlu/extractors/spacy_entity_extractor.py", line 33, in process
doc = spacy_nlp(message.get(TEXT))
from rasalit.
Could you share your spaCy version, just in case? I'm wondering if you're using spaCy-nightly, which we currently don't support yet.
from rasalit.
@digitalWestie just to mention, we're collecting namelists for your name detection use-case over at rasa nlu examples. I'll also add a new component there that will be able to do string matching like you are, but in an optimised fashion using flashtext.
from rasalit.
Nope, pip says I'm using spaCy 2.3.4
Interesting you mention the names, we could easily put together a UK-centric list using the Babies First Names' datasets offered by National Records - https://www.nrscotland.gov.uk/statistics-and-data/statistics/statistics-by-theme/vital-events/names/babies-first-names
from rasalit.
Interesting. I'm also getting the same error.
File "/Users/vincent/Development/rasalit/venv/lib/python3.7/site-packages/streamlit/script_runner.py", line 324, in _run_script
exec(code, module.__dict__)
File "/Users/vincent/Development/rasalit/rasalit/apps/livenlu/app.py", line 32, in <module>
interpreter=interpreter, text_input=text_input
File "/Users/vincent/Development/rasalit/rasalit/apps/livenlu/common.py", line 29, in fetch_info_from_message
element.process(msg)
File "/Users/vincent/Development/rasalit/venv/lib/python3.7/site-packages/rasa/nlu/extractors/spacy_entity_extractor.py", line 33, in process
doc = spacy_nlp(message.get(TEXT))
Will investigate. Removing the SpacyEntityExtractor
makes everything work again, but I'm curious to find out if there's a bug on Rasa's side or on the side of this repo.
from rasalit.
It's on this side because I seem to be able to run;
> rasa shell nlu
hello my name is George
{
...
"entities": [
{
"entity": "PERSON",
"value": "George",
"start": 17,
"confidence": null,
"end": 23,
"extractor": "SpacyEntityExtractor"
}
]
}
from rasalit.
Working on a solution #29
from rasalit.
@digitalWestie I think I've merged a fix now. Let me know if it doesn't work and I'll gladly re-open the issue.
from rasalit.
Working great! Thanks for this π π₯
from rasalit.
@bshivkumar15 could you share the entire traceback? It indeed seems like something is happening over at the spaCy interface, but the actual error itself doesn't seem to be listed. Also, could you share your config.yml
? Are you using a custom spaCy model here? Could you also share your spaCy version as well as the output of rasa --version
?
from rasalit.
@koaning Sharing requested details
Rasa Version : 2.0.2
Rasa SDK Version : 2.0.0
Rasa X Version : 0.34.0
Python Version : 3.8.5
Operating System : Linux-5.8.0-41-generic-x86_64-with-glibc2.29
Python Path : /home/shiva/Documents/Shiva/venv/bin/python3
============================== Info about spaCy ==============================
spaCy version 3.0.3
Location /home/shiva/Documents/Shiva/venv/lib/python3.8/site-packages/spacy
Platform Linux-5.8.0-41-generic-x86_64-with-glibc2.29
Python version 3.8.5
Pipelines
from rasalit.
Then I think I've found the problem. You're using spaCy version 3.0.3, which isn't supported by Rasa yet. There is a pull request open for it RasaHQ/rasa#7869. For now, the simplest fix would be to explicitly add "en_core_web_md"
explicitly as a spaCy model in the config. That should fix most issues.
Also, I'd still appreciate a full traceback just to confirm that this is the actual issue.
from rasalit.
@koaning Thanks a lot adding en_code_web_md resolved the issue.
from rasalit.
Rasa NLU Model Playground.txt
Rasa Spelling Playground.txt
I still end the "en" error when using other options
from rasalit.
@bshivkumar15 I'm trying to understand what is going wrong here but I require more context. You sent me two files, what's the difference between the two? Also, could you share your config.yml
?
from rasalit.
@koaning Apologies of being vague , the attached files are output when I run the spelling and live-nlu options. The same config file works for gridresults after adding the model: "en_core_web_sm" line
from rasalit.
Just to check something else then, since now I'm confused. Is this still an issue? You're using a spaCy version (3.0) that Rasa currently doesn't support but you seem to be able to fix it with a change to your config.yml
. From my end, you're not describing an issue that is related to this library.
from rasalit.
#issue -1
ModuleNotFoundError: No module named 'en' when running βgridresultsβ
issue status: RESOLVED after adding model: "en_core_web_sm" line in config.yml
#issue-2 / Issue #3
When using the modified config.yml (with model: "en_core_web_sm" line in config.yml)
Get ModuleNotFoundError: No module named 'en' when running
- rasalit spelling
- rasalit live-nlu
Hope this helps. if you are suggesting the issue #2/#3 is related to spacy version, I just wanted to understand if they can be fixed like #1 or is this a limitation.
from rasalit.
Just to check, after modifying the config.yml
did you also retrain a new model and are you using that model in rasalit?
from rasalit.
Considering the feedback here #40 I think this issue is fixed. If not, let's start a new issue that is specific to your issue.
from rasalit.
Related Issues (20)
- Bulk Labelling UI HOT 1
- [BUG] - Rasa Spelling PLAYGROUND HOT 8
- [Spelling/NLU-playground] Support Custom NLU components HOT 13
- Make utilities available for Jupyter Users too HOT 10
- Add Bulk Labelling notebook HOT 1
- missing whatlies dependency HOT 5
- Missing Rasa logo HOT 7
- Friendlier error message
- Add attention viewer for DIET
- Add TF/IDF to clusterview
- Add quick summary and confidence to nlu visual
- Adding labeled utterances for reference in Bulk Labeling Tool HOT 4
- Add custom theme for Rasa HOT 1
- Update Attention Viewer
- How can I run all features at same time on one port using single command? HOT 9
- Can rasalit be used to visualise the semantic similarity clusters of sentences using huggingface models? HOT 2
- Error while pip installing rasalit from github: "TypeError: a bytes-like object is required, not 'str'" HOT 7
- Updating to RASA 3.x
- Displaying attention heatmaps with respect to input tokens vs entities HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rasalit.