You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I cannot contact Pasquale Minervini directly (nor append the question to his fork), therefore:
Is it correct, that one has to change public class FactsResource to account for Factuality and Attribution?
I modified the class in this way:
public FactsBean query(String sentence) {
MinIE minie = new MinIE(sentence, FactsResource.parser, MinIE.Mode.AGGRESSIVE);
List<Fact> facts = new ArrayList<>();
//System.out.println("Extractions:");
for (AnnotatedProposition ap: minie.getPropositions()) {
String att = "None";
List<AnnotatedPhrase> triple = ap.getTriple();
String s = triple.get(0).toString();
String p = triple.get(1).toString();
String o = triple.get(2).toString();
String f = ap.getFactualityAsString();
if (ap.getAttribution().getAttributionPhrase() != null) {
att = ap.getAttribution().toStringCompact(); }
Fact fact = new Fact(s, p, o, att, f);
facts.add(fact); }
I have also set getter and setter methods in line with the new constructor public Fact(String s, String p, String o, String at, String f).
The service is not working correctly all the time. Although the non-service (Demo.java) would yield empty sets for these instances, the service would return:
I cannot contact Pasquale Minervini directly (nor append the question to his fork), therefore:
Is it correct, that one has to change
public class FactsResource
to account for Factuality and Attribution?I modified the class in this way:
I have also set getter and setter methods in line with the new constructor
public Fact(String s, String p, String o, String at, String f)
.The service is not working correctly all the time. Although the non-service (Demo.java) would yield empty sets for these instances, the service would return:
Without stating the reasons for the behavoir. Also the Logger.getLogger() output won't yield anything useful on the cmd where the service was started.
What would be the correct way to have the service yield the Factuality and Attribution without giving failed requests?
The text was updated successfully, but these errors were encountered: