spacy

Could not install packages due to an EnvironmentError: [Errno 28] No space left on device

大憨熊 提交于 2020-05-25 17:24:48
问题 I was trying to install python -m spacy download en_vectors_web_lg But it was throwing error: Could not install packages due to an EnvironmentError: [Errno 28] No space left on device May I know why is it creating the error ? Is it saying that I do not have enogh space in directory to install ?? 回答1: Most likely it is trying to download the data to your /tmp temporary location. My guess is that the default settings (usually half your ram) is too small to handle the download. You can disable

In spacy, how to use your own word2vec model created in gensim?

蓝咒 提交于 2020-05-25 12:19:42
问题 I have trained my own word2vec model in gensim and I am trying to load that model in spacy. First, I need to save it in my disk and then try to load an init-model in spacy but unable to figure out exactly how. gensimmodel Out[252]: <gensim.models.word2vec.Word2Vec at 0x110b24b70> import spacy spacy.load(gensimmodel) OSError: [E050] Can't find model 'Word2Vec(vocab=250, size=1000, alpha=0.025)'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory. 回答1:

In spacy, how to use your own word2vec model created in gensim?

一曲冷凌霜 提交于 2020-05-25 12:18:30
问题 I have trained my own word2vec model in gensim and I am trying to load that model in spacy. First, I need to save it in my disk and then try to load an init-model in spacy but unable to figure out exactly how. gensimmodel Out[252]: <gensim.models.word2vec.Word2Vec at 0x110b24b70> import spacy spacy.load(gensimmodel) OSError: [E050] Can't find model 'Word2Vec(vocab=250, size=1000, alpha=0.025)'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory. 回答1:

Remove overlapping numbers from inside a tuple in python such that no 2 tuples have the same starting or ending number

落花浮王杯 提交于 2020-05-17 06:05:14
问题 I have a list of tuples. Each tuple consists of a string and a dict. Now each dict in that, consists of a list of tuples. The size of the list is around 8K entries. Sample data: dataset = [('made of iron oxide', {'entities': [(12, 16, 'PRODUCT'), (17, 20, 'PRODUCT'), (15, 24, 'PRODUCT'), (12, 19, 'PRODUCT')]}),('made of ferric oxide', {'entities': [(10, 15, 'PRODUCT'), (12, 15, 'PRODUCT'), (624, 651, 'PRODUCT'), (1937, 1956, 'PRODUCT')]})] From here output expected is: dataset = [('made of

Remove overlapping numbers from inside a tuple in python such that no 2 tuples have the same starting or ending number

三世轮回 提交于 2020-05-17 06:04:21
问题 I have a list of tuples. Each tuple consists of a string and a dict. Now each dict in that, consists of a list of tuples. The size of the list is around 8K entries. Sample data: dataset = [('made of iron oxide', {'entities': [(12, 16, 'PRODUCT'), (17, 20, 'PRODUCT'), (15, 24, 'PRODUCT'), (12, 19, 'PRODUCT')]}),('made of ferric oxide', {'entities': [(10, 15, 'PRODUCT'), (12, 15, 'PRODUCT'), (624, 651, 'PRODUCT'), (1937, 1956, 'PRODUCT')]})] From here output expected is: dataset = [('made of

Spacy — ImportError: preshed.maps does not export expected C function map_clear

馋奶兔 提交于 2020-05-17 03:01:38
问题 I am trying to import spacy in vain. >>> import spacy Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\Alienware\Anaconda3\envs\tf2\lib\site-packages\spacy\__init__.py", line 12, in <module> from . import pipeline File "C:\Users\Alienware\Anaconda3\envs\tf2\lib\site-packages\spacy\pipeline\__init__.py", line 4, in <module> from .pipes import Tagger, DependencyParser, EntityRecognizer, EntityLinker File "pipes.pyx", line 24, in init spacy.pipeline.pipes

Spacy — ImportError: preshed.maps does not export expected C function map_clear

隐身守侯 提交于 2020-05-17 02:59:19
问题 I am trying to import spacy in vain. >>> import spacy Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\Alienware\Anaconda3\envs\tf2\lib\site-packages\spacy\__init__.py", line 12, in <module> from . import pipeline File "C:\Users\Alienware\Anaconda3\envs\tf2\lib\site-packages\spacy\pipeline\__init__.py", line 4, in <module> from .pipes import Tagger, DependencyParser, EntityRecognizer, EntityLinker File "pipes.pyx", line 24, in init spacy.pipeline.pipes

How to match dependency patterns with spaCy?

心不动则不痛 提交于 2020-05-15 09:57:11
问题 Is there a way to use spaCy's rule-based pattern matcher (or a similar library) on dependency sequences such as the list of tokens returned by token.ancestors ? For example, I have pluralized a noun and now I need to check for dependent verbs to fix any errors in verb agreement. So one pattern (of many) would be to match an 'auxpass' verb belonging to a parent verb which is a relative clause of the noun. 回答1: I kind of hesitate to recommend something that doesn't have any documentation yet,

Trouble Installing spaCy english model in python 2.7? And upgrading python to 3.5?

孤人 提交于 2020-05-15 08:22:21
问题 I am trying to install the spaCy english model on my mac after installing the program. Right now my machine has python 2.7. I have installed spaCy in the venv then followed that with "python -m spacy.en.download" to install the model as instructed on the website. When I try to do that I get the following in response: $ python -m spacy.en.download Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module

Python NLP Text Tokenization based on custom regex

时光毁灭记忆、已成空白 提交于 2020-05-09 16:02:28
问题 I am processing large amount of text for custom (NER) Named Entity Recognition using Spacy. For text pre-processing I am using nltk for tokenization..etc. I am able to process one of my custom entities which is based on simple strings. But the other custom entity is a combination of number and certain text (20 BBLs for example). The word_tokenize method from nltk.tokenize tokenizes 20 and 'BBLs' separately each as a separate token. What I want is to treat them (the number and the 'BBLs'