Does spacy-cpp support Chinese? #21
Closed
PythonCancer
started this conversation in
Q&A
Replies: 1 comment
-
Hi @PythonCancer - I believe the Chinese support of I'm not very well-versed in Chinese, so I cannot say whether it's working well. But here's an example: #include <iostream>
#include <spacy/spacy>
int main()
{
Spacy::Spacy spacy;
auto nlp = spacy.load("zh_core_web_sm");
auto doc = nlp.parse("这是一句话。");
for (auto& token : doc.tokens())
std::cout << token.text() << " [" << token.pos_() << "]\n";
} The output is:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
May I ask if your encapsulation of the space library also supports Chinese word segmentation, annotation, and entity naming functions?
Beta Was this translation helpful? Give feedback.
All reactions