/*************************************************************************/ /* */ /* Use of the link grammar parsing system is subject to the terms of the */ /* license set forth in the LICENSE file included with this software. */ /* This license allows free redistribution and use in source and binary */ /* forms, with or without modification, subject to certain conditions. */ /* */ /*************************************************************************/ package org.linkgrammar; import java.util.ArrayList; import java.util.Iterator; import java.util.List; /** * *

* Represents the result of parsing a piece of text. The result * consists of some global meta information about the whole parse * and a list of Linkages returned by the parser. The * original parsed text is available as the text attribute. *

* * @author Borislav Iordanov * */ public class ParseResult implements Iterable { String parserVersion; String dictVersion; String text; List linkages = new ArrayList(); int numSkippedWords; public Iterator iterator() { return linkages.iterator(); } public List getLinkages() { return linkages; } public String getText() { return text; } public void setText(String text) { this.text = text; } public int getNumSkippedWords() { return numSkippedWords; } public void setNumSkippedWords(int numSkippedWords) { this.numSkippedWords = numSkippedWords; } public String getParserVersion() { return parserVersion; } public void setParserVersion(String parserVersion) { this.parserVersion = parserVersion; } public String getDictVersion() { return dictVersion; } public void setDictVersion(String dictVersion) { this.dictVersion = dictVersion; } }