Skip to content

Commit

Permalink
Revert: 人名识别按等效词串查询:hankcs#521 (comment) 。因为部分姓氏是nr词性,而 未##人 没有B角色
Browse files Browse the repository at this point in the history
  • Loading branch information
hankcs committed May 21, 2017
1 parent e6f0617 commit 30d5068
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,13 @@ public static boolean Recognition(List<Vertex> pWordSegResult, WordNet wordNetOp
public static List<EnumItem<NR>> roleObserve(List<Vertex> wordSegResult)
{
List<EnumItem<NR>> tagList = new LinkedList<EnumItem<NR>>();
for (Vertex vertex : wordSegResult)
Iterator<Vertex> iterator = wordSegResult.iterator();
iterator.next();
tagList.add(new EnumItem<NR>(NR.A, NR.K)); // 始##始 A K
while (iterator.hasNext())
{
EnumItem<NR> nrEnumItem = PersonDictionary.dictionary.get(vertex.word);
Vertex vertex = iterator.next();
EnumItem<NR> nrEnumItem = PersonDictionary.dictionary.get(vertex.realWord);
if (nrEnumItem == null)
{
switch (vertex.guessNature())
Expand Down

0 comments on commit 30d5068

Please sign in to comment.