Skip to content

Commit fd6800f

Browse files
committed
Tiny test of the UniversalPOSMapper
1 parent 731fc8e commit fd6800f

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package edu.stanford.nlp.trees;
2+
3+
import org.junit.Assert;
4+
import org.junit.Test;
5+
6+
import edu.stanford.nlp.trees.Tree;
7+
8+
public class UniversalPOSMapperTest {
9+
@Test
10+
public void testMap() {
11+
Tree tree = Tree.valueOf("(ROOT (S (NP (DT This)) (VP (VBZ is) (NP (DT a) (JJ simple) (NN test)))))");
12+
Tree newTree = UniversalPOSMapper.mapTree(tree);
13+
Tree expected = Tree.valueOf("(ROOT (S (NP (PRON This)) (VP (VERB is) (NP (DET a) (ADJ simple) (NOUN test)))))");
14+
Assert.assertEquals(expected, newTree);
15+
}
16+
}
17+

0 commit comments

Comments
 (0)