Skip to content

Commit

Permalink
修复 MaxEntDependencyParser fix #914
Browse files Browse the repository at this point in the history
  • Loading branch information
hankcs committed Aug 11, 2018
1 parent 9481c07 commit a7124e8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/com/hankcs/hanlp/dependency/common/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@
*/
public class Node
{
public final static Node NULL = new Node(new Term(CoNLLWord.NULL.NAME, Nature.n), -1);
private final static Map<String, String> natureConverter = new TreeMap<String, String>();
static
{
NULL.label = "null";
natureConverter.put("begin", "root");
natureConverter.put("bg", "b");
natureConverter.put("e", "y");
Expand Down Expand Up @@ -101,6 +99,11 @@ public class Node
natureConverter.put("yg", "y");
natureConverter.put("zg", "z");
}
public final static Node NULL = new Node(new Term(CoNLLWord.NULL.NAME, Nature.n), -1);
static
{
NULL.label = "null";
}
public String word;
public String compiledWord;
public String label;
Expand Down

0 comments on commit a7124e8

Please sign in to comment.