-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
修复Nature.fromString和IOUtil.loadDictionary:#626
- Loading branch information
Showing
5 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.hankcs.hanlp.corpus.tag; | ||
|
||
import com.hankcs.hanlp.corpus.util.CustomNatureUtility; | ||
import junit.framework.TestCase; | ||
|
||
public class NatureTest extends TestCase | ||
{ | ||
public void testFromString() throws Exception | ||
{ | ||
Nature one = CustomNatureUtility.addNature("新词性1"); | ||
Nature two = CustomNatureUtility.addNature("新词性2"); | ||
|
||
assertEquals(one, Nature.fromString("新词性1")); | ||
assertEquals(two, Nature.fromString("新词性2")); | ||
} | ||
} |