pinyin4j | A copy of http : //sourceforge.net/projects/pinyin4j | DevOps library
kandi X-RAY | pinyin4j Summary
kandi X-RAY | pinyin4j Summary
A copy of then deploy it to maven central repository.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Create boolean expression from stream tokenizer .
- Set the string values of the element .
- Convert tone number to tune mark .
- Returns the next token .
- Load trie from input stream
- Convert the given string to Chinese uppercase string
- Ensure that an XPath matches the given xpath .
- Reads a CDATA section .
- Convert hanyanduin string to gwoodin micrope
- Convert the Pinyinization system to the originalPinyinization system .
pinyin4j Key Features
pinyin4j Examples and Code Snippets
Community Discussions
Trending Discussions on pinyin4j
QUESTION
my pom.xml file:
...ANSWER
Answered 2021-Sep-15 at 03:45You have told Maven that your project is only a POM artifact (which doesn't have code or need jars):
QUESTION
Is there a programmatic way to identify the tones in Chinese text?
For an input string like 苹果
I need to extract the tones as 2
and 3
as it would be indicated in the pinyin transliteration píng guǒ
or ping2 guo3
.
I guess a possible workaround would be converting Chinese hanzi text to pinyin (e.g. with pinyin4j) and then extract the tones from pinyin, but I assume there must be a better and direct way to do it.
ContextThe question is about if there is some algorithmic way to identify the tones or if the only way is a map lookup against an authoritative source e.g. the publicly available CEDICT database.
...ANSWER
Answered 2020-Sep-19 at 13:18I'm a native speaker, and I doubt that it's possible. Chinese character can have multiple tones depending on the context. The only reliable way to do this is to call some APIs with the full context.
Since you can't be sure what tone the character is just by judging it individually, there's no such "algorithm" to map them to their tones.
For instance, "一" can be tone 1, 2, 4, or neutral depending on the context.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install pinyin4j
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page