Skip to content

Commit

Permalink
Tiny test of the UniversalPOSMapper
Browse files Browse the repository at this point in the history
  • Loading branch information
AngledLuffa committed Mar 14, 2024
1 parent 731fc8e commit fd6800f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/src/edu/stanford/nlp/trees/UniversalPOSMapperTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package edu.stanford.nlp.trees;

import org.junit.Assert;
import org.junit.Test;

import edu.stanford.nlp.trees.Tree;

public class UniversalPOSMapperTest {
@Test
public void testMap() {
Tree tree = Tree.valueOf("(ROOT (S (NP (DT This)) (VP (VBZ is) (NP (DT a) (JJ simple) (NN test)))))");
Tree newTree = UniversalPOSMapper.mapTree(tree);
Tree expected = Tree.valueOf("(ROOT (S (NP (PRON This)) (VP (VERB is) (NP (DET a) (ADJ simple) (NOUN test)))))");
Assert.assertEquals(expected, newTree);
}
}

0 comments on commit fd6800f

Please sign in to comment.