Created
October 26, 2010 15:02
-
-
Save egonw/647057 to your computer and use it in GitHub Desktop.
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
@Test public Oscar testConstructor() throws URISyntaxException { | |
Oscar oscar = new Oscar(); | |
Assert.assertNotNull(oscar); | |
return oscar; | |
} | |
@Given("#testConstructor") | |
public String testNormalize(Oscar oscar) throws URISyntaxException { | |
String input = oscar.normalize("This is a simple input string with benzene."); | |
Assert.assertNotNull(input); | |
return input; | |
} | |
@Given("#testConstructor,#testNormalize") | |
public List<TokenSequence> testTokenize(Oscar oscar, String input) throws Exception { | |
List<TokenSequence> tokens = oscar.tokenize(input); | |
Assert.assertNotNull(tokens); | |
Assert.assertNotSame(0, tokens.size()); | |
return tokens; | |
} | |
@Given("#testConstructor,#testTokenize") | |
public void testRecognizeNamedEntities(Oscar oscar, List<TokenSequence> tokens) throws Exception { | |
List<NamedEntity> entities = oscar.recognizeNamedEntities(tokens); | |
Assert.assertNotNull(entities); | |
Assert.assertEquals(1, entities.size()); | |
System.out.println(""+ entities.get(0)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment