<p>This doesn't work with all texts but it should provide a 100% grab for supported texts.</p>
<p>You can use parameters to find <a href="https://en.wikipedia.org/wiki/Proper_name_mark" rel="nofollow noreferrer">proper name mark</a>s throughout texts:</p>
<blockquote>
<p>In Chinese writing, a proper name mark (Simplified Chinese: 专名号, zhuānmínghào; Traditional Chinese: 專名號) is an underline used to mark proper names, such as the names of people, places, dynasties, organizations. The related book name mark (Simplified Chinese: 书名号, shūmínghào; Traditional Chinese: 書名號) indicated by a wavy underline (﹏﹏) is used to mark the titles of publications or texts.</p>
<p>For example:</p>
<p>屈原放逐，乃賦離騒。左丘失明，厥有國語。（司馬遷 《報任安書》）(using double underline to indicate wavy underline)</p>
<p>屈原放逐，乃賦離騒。左丘失明，厥有國語。 (using CSS 3; wavy underline may not be visible in all browsers)</p>
<p>Qu Yuan was exiled, and thus composed the Li Sao. Zuo Qiu (or Zuoqiu<a href="https://en.wikipedia.org/wiki/Proper_name_mark" rel="nofollow noreferrer">1</a>) lost his sight, hence there is the Guo Yu. (Sima Qian, Letter to Ren An)</p>
</blockquote>
<p>(Underline doesn't seem to be supported, check the Wiki link for the better example.)</p>
<p>The problem is that:</p>
<blockquote>
<p>The proper name mark is rarely used in modern Chinese publications, and the Guillemet (《 》or〈 〉) is more commonly used to indicate titles. It is occasionally used in Taiwan and Hong Kong in school textbooks. However, in scholarly editions of classical Chinese texts, especially vertically typeset texts (where they appear to the left of the text instead of underneath), use of both the proper name mark and the book name mark is common, as they help readers avoid misinterpretations of the text.</p>
</blockquote>

CC BY-SA 4.0
2020-02-19T02:21:08.423Z
Proper name marks are not uncommon in published editions of classical Chinese texts, but they seldom have digital version. Since OP asks for an algorithm, I guess OP needs digital version.
Betty
CC BY-SA 4.0
2020-02-18T12:10:17.087Z
2020-02-18T12:10:17.087Z
2020-06-17T09:50:11.587Z
Mou某
<p>This is a non-trivial task.</p>
<p>For example, in the sentence below, are 李三 张三 both name of people?</p>
<p>李三买了一张三角桌子。</p>
<p>A deep-learning based algorithm is your best bet, for example:</p>
<p><a href="https://zhuanlan.zhihu.com/p/61227299" rel="nofollow noreferrer">https://zhuanlan.zhihu.com/p/61227299</a></p>
<p><a href="https://github.com/wainshine/Chinese-Names-Corpus" rel="nofollow noreferrer">https://github.com/wainshine/Chinese-Names-Corpus</a></p>

CC BY-SA 4.0
2020-07-17T23:34:36.437Z
2020-07-17T23:34:36.437Z
Siyi Deng
<p>It seems to be an impossible task. For example this sentence
加利福尼亚在美国。
There are two names in the sentence, the first one has five characters, and the second one has two characters. Unless you have come across these names before, you would not know.
Names after 叫 must be a very tiny part of all places where a name springs up.</p>

CC BY-SA 4.0
2020-07-17T13:50:45.327Z
2020-07-17T13:50:45.327Z
Xuehong Zhang
<p>Depending on your use case, you could consider an approach like the following:</p>
<ol>
<li><p>Segment the text into words using some tried-and-trained machine learning algorithm (this step alone will already yield imperfect results).</p>
</li>
<li><p>Look up each word in the free and downloadable <a href="https://cc-cedict.org/wiki/" rel="nofollow noreferrer">CC-Cedict</a> dictionary.</p>
</li>
<li><p>Check if the Pinyin field for that word's CC-Cedict entry begins with a capital letter.</p>
<p>If you want some idea of how accurate such an approach would be, try playing around with the <a href="https://www.zizibuwang.com/advanced?q=pinyin+slike+%5E%5BA-Z%5D%0Asimp+%21like+%5BA-Z%5D" rel="nofollow noreferrer">regex-based query here</a> (disclaimer - shameless plug for my app; instructions available by clicking the ℹ icon).</p>
</li>
<li><p>If yes, judge that the word is a proper noun. Else, judge that it isn't.</p>
</li>
</ol>
<blockquote>
<p><em>[Edited - previous answer below. Above approach is simpler, probably more reliable, and doesn't require sending tons of network requests]</em></p>
<ol start="2">
<li>For each word (or string of isolated characters that have been judged <em>not</em> to form a word), use the Wikipedia API to check if a page exists for it, using a query something like this:
<a href="https://zh.wikipedia.org/wiki/Special:ApiSandbox#action=query&amp;format=json&amp;prop=categories&amp;titles=%E8%89%BE%E5%80%AB%C2%B7%E7%91%9E%E5%85%8B%E6%9B%BC&amp;formatversion=2" rel="nofollow noreferrer">action=query&amp;format=json&amp;prop=categories&amp;titles=...&amp;formatversion=2</a></li>
<li>If yes, check if one or more of the categories of said page match some variation of the following regex:
<pre><code>/(?:人|者|地名|城市)$/
</code></pre>
</li>
<li>If yes, judge that the word is a proper noun. Else, judge that it isn't.</li>
</ol>
</blockquote>
<p>Either approach will be a little messy and not entirely reliable, but if you're lucky you might hit at least the 50% accuracy you're hoping for.</p>

CC BY-SA 4.0
2020-07-17T16:11:22.073Z
2020-07-17T16:37:06.437Z
2020-07-17T16:37:06.437Z
Lionel Rowe
<p>I am writing an application for extraction information from Chinese texts. One of the tasks is finding names (personal, geographical or something else). The algorithm is not required to find all 100% of the names. 50% is enough.</p>

<p>In European languages(for example English or Russian), I can detect names by first capital letters: if a word in the middle of the sentence begins with a capital letter then this word is name. This criterion is not 100% reliable and it does not allow to find all names but for my purpose it is enough.</p>

<p>I know that sometimes (but not always) name can be after 叫. But I do not know how long this name.</p>

<p>Could you tell me some sings (criterions, features) by which the algorithm can find the names in Chinese texts?</p>

CC BY-SA 4.0
2020-02-18T11:03:20.900Z
You will need some machine learning tools to accomplish this. It is not easy, and most likely you will not achieve 50% only with some trivial method.
fefe
CC BY-SA 4.0
2020-02-18T11:12:14.767Z
There are some open source word segmentation algorithms out there that can identify entity names (personal names, organizations, places, etc ...). [This post](https://www.zhihu.com/question/19578687) has a list for some of them.
fefe
CC BY-SA 4.0
2020-02-18T11:17:06.947Z
This may be a better fit for ComputerScience.SE.  I asked a similar question there: [How to identify measure words in Chinese text?](https://cs.stackexchange.com/questions/120233/how-to-identify-measure-words-in-chinese-text)
Becky 李蓓
CC BY-SA 4.0
2020-03-19T13:08:32.523Z
Sometimes, one may be addressed by only their surname, sometimes full name. Surnames and names usually are words used in common situations. I personally don't believe there is an easy way of extracting names. And I do agree that machine learning may be a solution. Something as simple as 李子 could be just a fruit or a name.
Daniel Cheung
<names><software>
Algorithm for finding names in Chinese texts
# Algorithm for finding names in Chinese texts

(Asked by: username_0 on 2020-02-18)

I am writing an application for extraction information from Chinese texts. One of the tasks is finding names (personal, geographical or something else). The algorithm is not required to find all 100% of the names. 50% is enough.

In European languages(for example English or Russian), I can detect names by first capital letters: if a word in the middle of the sentence begins with a capital letter then this word is name. This criterion is not 100% reliable and it does not allow to find all names but for my purpose it is enough.

I know that sometimes (but not always) name can be after 叫. But I do not know how long this name.

Could you tell me some sings (criterions, features) by which the algorithm can find the names in Chinese texts?

**Tags:** names, software

> **Comments:**
> **username_1**: You will need some machine learning tools to accomplish this. It is not easy, and most likely you will not achieve 50% only with some trivial method.  
> **username_1**: There are some open source word segmentation algorithms out there that can identify entity names (personal names, organizations, places, etc ...). [This post](https://www.zhihu.com/question/19578687) has a list for some of them.  
> **username_2**: This may be a better fit for ComputerScience.SE.  I asked a similar question there: [How to identify measure words in Chinese text?](https://cs.stackexchange.com/questions/120233/how-to-identify-measure-words-in-chinese-text)  
> **username_3**: Sometimes, one may be addressed by only their surname, sometimes full name. Surnames and names usually are words used in common situations. I personally don't believe there is an easy way of extracting names. And I do agree that machine learning may be a solution. Something as simple as 李子 could be just a fruit or a name.  

---

## 4 answers

### Answer by username_4 on 2020-02-18. Score: 2

This doesn't work with all texts but it should provide a 100% grab for supported texts.

You can use parameters to find [proper name mark](https://en.wikipedia.org/wiki/Proper_name_mark)s throughout texts:

> In Chinese writing, a proper name mark (Simplified Chinese: 专名号, zhuānmínghào; Traditional Chinese: 專名號) is an underline used to mark proper names, such as the names of people, places, dynasties, organizations. The related book name mark (Simplified Chinese: 书名号, shūmínghào; Traditional Chinese: 書名號) indicated by a wavy underline (﹏﹏) is used to mark the titles of publications or texts.
>
> For example:
>
> 屈原放逐，乃賦離騒。左丘失明，厥有國語。（司馬遷 《報任安書》）(using double underline to indicate wavy underline)
>
> 屈原放逐，乃賦離騒。左丘失明，厥有國語。 (using CSS 3; wavy underline may not be visible in all browsers)
>
> Qu Yuan was exiled, and thus composed the Li Sao. Zuo Qiu (or Zuoqiu[1](https://en.wikipedia.org/wiki/Proper_name_mark)) lost his sight, hence there is the Guo Yu. (Sima Qian, Letter to Ren An)

(Underline doesn't seem to be supported, check the Wiki link for the better example.)

The problem is that:

> The proper name mark is rarely used in modern Chinese publications, and the Guillemet (《 》or〈 〉) is more commonly used to indicate titles. It is occasionally used in Taiwan and Hong Kong in school textbooks. However, in scholarly editions of classical Chinese texts, especially vertically typeset texts (where they appear to the left of the text instead of underneath), use of both the proper name mark and the book name mark is common, as they help readers avoid misinterpretations of the text.

> **Comments:**
> **username_5**: Proper name marks are not uncommon in published editions of classical Chinese texts, but they seldom have digital version. Since OP asks for an algorithm, I guess OP needs digital version.  

---

### Answer by username_6 on 2020-07-17. Score: 1

This is a non-trivial task.

For example, in the sentence below, are 李三 张三 both name of people?

李三买了一张三角桌子。

A deep-learning based algorithm is your best bet, for example:

<https://zhuanlan.zhihu.com/p/61227299>

<https://github.com/wainshine/Chinese-Names-Corpus>


---

### Answer by username_7 on 2020-07-17. Score: 0

It seems to be an impossible task. For example this sentence
加利福尼亚在美国。
There are two names in the sentence, the first one has five characters, and the second one has two characters. Unless you have come across these names before, you would not know.
Names after 叫 must be a very tiny part of all places where a name springs up.


---

### Answer by username_8 on 2020-07-17. Score: 0

Depending on your use case, you could consider an approach like the following:

1. Segment the text into words using some tried-and-trained machine learning algorithm (this step alone will already yield imperfect results).
2. Look up each word in the free and downloadable [CC-Cedict](https://cc-cedict.org/wiki/) dictionary.
3. Check if the Pinyin field for that word's CC-Cedict entry begins with a capital letter.

   If you want some idea of how accurate such an approach would be, try playing around with the [regex-based query here](https://www.zizibuwang.com/advanced?q=pinyin+slike+%5E%5BA-Z%5D%0Asimp+%21like+%5BA-Z%5D) (disclaimer - shameless plug for my app; instructions available by clicking the ℹ icon).
4. If yes, judge that the word is a proper noun. Else, judge that it isn't.

> *[Edited - previous answer below. Above approach is simpler, probably more reliable, and doesn't require sending tons of network requests]*
>
> 2. For each word (or string of isolated characters that have been judged *not* to form a word), use the Wikipedia API to check if a page exists for it, using a query something like this:
>    [action=query&format=json&prop=categories&titles=...&formatversion=2](https://zh.wikipedia.org/wiki/Special:ApiSandbox#action=query&format=json&prop=categories&titles=%E8%89%BE%E5%80%AB%C2%B7%E7%91%9E%E5%85%8B%E6%9B%BC&formatversion=2)
> 3. If yes, check if one or more of the categories of said page match some variation of the following regex:
>
>    ```
>    /(?:人|者|地名|城市)$/
>
>    ```
> 4. If yes, judge that the word is a proper noun. Else, judge that it isn't.

Either approach will be a little messy and not entirely reliable, but if you're lucky you might hit at least the 50% accuracy you're hoping for.


---

