use of infoeval.main.WikiData.WikiParsing in project Info-Evaluation by TechnionYP5777.
the class AwardsQueryTest method test1.
@Test
public void test1() throws IOException {
WikiParsing wiki = new WikiParsing("https://en.wikipedia.org/wiki/Taylor_Swift");
wiki.Parse("awarded");
System.out.print(wiki.getText());
infoeval.main.Analysis.AwardsQuery aw = new AwardsQuery(wiki.getParagraphs());
aw.analyze();
for (final String ¢ : aw.getInformation()) System.out.println(¢);
}
use of infoeval.main.WikiData.WikiParsing in project Info-Evaluation by TechnionYP5777.
the class InfoevalServiceImp method getAwards.
@Override
@CrossOrigin
@RequestMapping(path = "Queries/Awards", method = RequestMethod.GET)
public synchronized LinkedList<String> getAwards(String name) throws Exception {
// Parse user's input:
try {
String UpdatedName = updteName(name);
logger.log(Level.INFO, "Analyzing Awards query from url: " + "https://en.wikipedia.org/wiki/" + UpdatedName);
WikiParsing wiki = (new WikiParsing("https://en.wikipedia.org/wiki/" + UpdatedName));
wiki.Parse("won");
wiki.isConflictedName();
wiki.getNames();
new ArrayList<>();
analyze.setParagraphsAwards(wiki.getParagraphs());
analyze.clearAwardsInformation();
analyze.AwardsQuery();
return analyze.getAwardsInformation();
} catch (Exception e) {
logger.log(Level.WARNING, "Problem in awards query");
throw e;
}
}
use of infoeval.main.WikiData.WikiParsing in project Info-Evaluation by TechnionYP5777.
the class AnalyzeParagraphTest method Test3.
// This test is for the new method of awards query.(see issue #224)
@Test
public void Test3() throws IOException {
WikiParsing wiki = (new WikiParsing("https://en.wikipedia.org/wiki/Justin_Bieber"));
wiki.Parse("arrested");
AnalyzeParagraph analyze = new AnalyzeParagraph();
analyze.setParagraphsArrests(wiki.getParagraphs());
analyze.ArrestsQuery();
assert analyze.getArrestsInformation().contains(" When he failed to do so, an arrest warrant was issued and two of his bodyguards were released in Argentina in April 2015");
}
use of infoeval.main.WikiData.WikiParsing in project Info-Evaluation by TechnionYP5777.
the class WikiParsingTest method test6.
@Test
public void test6() throws IOException {
WikiParsing wp = new WikiParsing("https://en.wikipedia.org/wiki/Michelle_Ann_Williams");
wp.Parse("refer");
wp.CheckAmbiguities();
assert wp.getNames().isEmpty();
}
use of infoeval.main.WikiData.WikiParsing in project Info-Evaluation by TechnionYP5777.
the class WikiParsingTest method test9.
@Test
public void test9() throws IOException {
WikiParsing wp = new WikiParsing("https://en.wikipedia.org/wiki/Agüero");
wp.Parse("refer");
wp.CheckAmbiguities();
assert wp.getNames().size() == 13;
}
Aggregations