8000 MinIE Service, options to include Factuality and Attribution? · Issue #12 · uma-pi1/minie · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
MinIE Service, options to include Factuality and Attribution? #12
Open
@chrisoutwright

Description

@chrisoutwright

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:

    <body>
        <div class="header">Request failed.</div>
        <div class="body">Request failed.</div>
        <div class="footer">Grizzly 2.4.0</div>
    </body>

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0