@Test public void testExtractSubject() throws IOException { assertEquals(Arrays.asList("игрушка", "Lava", "кукла", "майя"), subjExtractor.extract("мягкая муз игрушка Lava кукла майя в красном платье".split(" "))); assertEquals(Arrays.asList(new String[]{"сапог"}), subjExtractor.extract(new String[]{"женские", "сапоги"})); assertEquals(Arrays.asList(new String[]{"сапог"}), subjExtractor.extract(new String[]{"женские", "сапоги", "днепропетровск"})); assertEquals(Arrays.asList(new String[]{"чехол", "ozaki"}), subjExtractor.extract(new String[]{"чехол", "ozaki", "для", "iphone", "5"})); assertEquals(Arrays.asList(new String[]{"магнит"}), subjExtractor.extract(new String[]{"магнит", "на", "холодильник"})); assertEquals(Arrays.asList(new String[]{"GLOBAL", "устройство"}), subjExtractor.extract(new String[]{"GLOBAL", "Зарядное", "устройство"})); assertEquals(Arrays.asList(new String[]{"перчатка", "HEAD"}), subjExtractor.extract(new String[]{"Лыжные", "зимние", "теплые", "перчатки", "HEAD"})); assertEquals(Arrays.asList(new String[]{"палатка", "цвет", "sand"}), subjExtractor.extract(new String[]{"Купить", "туристическую", "палатку", "в", "Украине", "VAUDE", "Opera", "4P", "2013", "цвет", "sand"})); }
public List<String> extract(String[] tokens) throws IOException { return extract(parser.parse(tokens)); }
SubjectExtractor { public List<String> extract(String[] tokens) throws IOException { return extract(parser.parse(tokens)); } }
SubjectExtractor { public List<String> extract(String[] tokens) throws IOException { return extract(parser.parse(tokens)); } SubjectExtractor(Parser parser, String confStr, boolean normalize); }
SubjectExtractor { public List<String> extract(String[] tokens) throws IOException { return extract(parser.parse(tokens)); } SubjectExtractor(Parser parser, String confStr, boolean normalize); List<String> extract(String[] tokens); List<String> extract(Node.Top sent); List<Token> extractTokens(String[] tokens); List<Token> extractTokens(Node.Top sent); }
SubjectExtractor { public List<String> extract(String[] tokens) throws IOException { return extract(parser.parse(tokens)); } SubjectExtractor(Parser parser, String confStr, boolean normalize); List<String> extract(String[] tokens); List<String> extract(Node.Top sent); List<Token> extractTokens(String[] tokens); List<Token> extractTokens(Node.Top sent);  }