question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Chinese support for spacy

See original GitHub issue

I have been trying to train the machine for chinese language, I used https://github.com/UniversalDependencies/UD_Chinese-PUD/tree/master and converted into the JSON format using converter and stored it.

Trained the model since there is no other set such such as dev or train I used the same set for both after all this done I imported and started using the model.

In [2]: import spacy
   ...: nlp = spacy.load('models/model-final/')


In [3]: doc = nlp(u"嘿,你怎麼樣?")
   ...: for chunk in doc.noun_chunks:
   ...:     print(chunk.text, chunk.root.text, chunk.root.dep_,
   ...:           chunk.root.head.text)
Building prefix dict from the default dictionary ...
Loading model from cache /tmp/jieba.cache
Loading model cost 0.222 seconds.
Prefix dict has been built succesfully.
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-3-730a638fc8fd> in <module>()
      1 doc = nlp(u"嘿,你怎麼樣?")
----> 2 for chunk in doc.noun_chunks:
      3     print(chunk.text, chunk.root.text, chunk.root.dep_,
      4           chunk.root.head.text)
      5 

doc.pyx in __get__()

TypeError: 'NoneType' object is not callable

Your Environment

  • Operating System: Linux
  • Python Version Used: Venv 2.7 and 3.x
  • spaCy Version Used: latest
  • Environment Information:

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
howl-andersoncommented, Jul 16, 2018
0reactions
lock[bot]commented, Jan 15, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chinese · spaCy Models Documentation
spaCy is a free open-source library for Natural Language Processing in Python. It features NER, POS tagging, dependency parsing, word vectors and more....
Read more >
Chinese Natural Language Processing (spaCy)
Install package ## In terminal: !pip install spacy ## Download language model for Chinese and English !spacy download en !python -m spacy download ......
Read more >
POS tagging and NER for Chinese Text with Spacy
SpaCy is a fantastic package, but as of yet does not support Chinese, so I assume thats the reason you dont get POS...
Read more >
spacy-och - PyPI
the Old Chinese ( och ) language for the spaCy NLP library. installation. requires spacy v3. $ pip install spacy-och. usage. this package ......
Read more >
A few tips for doing Natural Language Processing (NLP) in ...
Today, the focus will be on the Chinese language and the subtleties I ... into two words with spacy and now only in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found