Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @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));
- }
Add Comment
Please, Sign In to add comment