Heading in Chinese
See original GitHub issueI found that sumy will distinguish heading and other sentences, so checked the source code and I found that: Whether a line is heading is decided by str.isupper() function. But in a str composed by Chinese characters, if it contains an uppercase alphabet, the isupper() will return True, but actually it is just a normal sentence instead of heading.
For example:
s1 = "你好啊,这儿有N盘蛋糕可以吃。"
s2 = "N你好啊,这儿有盘蛋糕可以吃。"
s3 = "你好啊,这儿有盘蛋糕可以吃。"
s1.isupper() # True
s2.isupper() # True
s3.isupper() # False
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top Results From Across the Web
heading in Simplified Chinese - Cambridge Dictionary
Learn the words you need to communicate with confidence. (Translation of heading from the Cambridge English-Chinese (Simplified) Dictionary © ...
Read more >HEADING - Translation in Chinese - bab.la
Translation for 'heading' in the free English-Chinese dictionary and many other Chinese translations.
Read more >heading - Translation into Chinese - examples English
Translations in context of "heading" in English-Chinese from Reverso Context: under this heading, heading to, heading for, heading towards, heading out.
Read more >biāo tí | Definition | Mandarin Chinese Pinyin English Dictionary
标题 : title, heading,... : biāo tí | Definition | Mandarin Chinese Pinyin English Dictionary | Yabla Chinese.
Read more >Chinese Translation of “heading” | Collins ... - Collins Dictionary
Chinese Translation of “heading” | The official Collins English-Traditional Dictionary online. Over 100000 Chinese translations of English words and ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I am agree with you that let PlaintextParser really plain text, but you can provide a optional API in PlaintextParser that appoint the HEADING of plain text, instead of detect by PlaintextParser because the text with ideal format is difficult. let this work decided by user is better than introduce a new parser.
About your doubt:
Thank you all. I think this is more tricky. I tried to find out some solution but seems I should introduce a new parser. Maybe
MarkdownParser
and letPlaintextParser
really plain text but some summarizers use headings to give you better results. Or I could introduce some new parser for common annotated texts used for summarizations. I don’t know.I would like to ask you because I have no idea about Chinese texts.
Thanks in advance and sorry for the really late reply. Have a nice day 🌞