Package kpi.asoiu.model

Examples of kpi.asoiu.model.Phrase


        types.put(PartsOfSentence.PREDICATE, predicateTypes);

    }

    public Phrase parse(Parse parse, PartsOfSentence partsOfSentence) {
        Phrase phrase = new Phrase();
        collect(parse, phrase, partsOfSentence);
//        System.out.println("!!! phrase = " + phrase);
        return phrase;
    }
View Full Code Here


    private Phrase collect(Parse p, Phrase phrase, PartsOfSentence partsOfSentence) {
        for (Parse parse : p.getChildren()) {
            System.out.println(parse.getType() + "_" + parse.getLabel() + "-" + parse.getHead() + " = " + partsOfSentence + "      " + parse);
            if (isParseIsPhrase(parse)) {
                phrase.getChildren().add(collect(parse, new Phrase(), partsOfSentence));
            } else {
                if (types.get(partsOfSentence).contains(parse.getType())) {
                    Word w = new Word();
                    w.setWord(parse.toString());
                    w.setPartOfLanguage(parse.getType());
View Full Code Here

TOP

Related Classes of kpi.asoiu.model.Phrase

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.