net.sourceforge.nrl.parser.preprocessing
Class ReferencePreprocessor
java.lang.Object
net.sourceforge.nrl.parser.preprocessing.ReferencePreprocessor
public class ReferencePreprocessor
- extends Object
The reference processor class detects fragment references, and resolves them
before the main parsing stage.
It scans the rule file for fragment declarations, and then for any sentence
fragments that equal the fragment declaration. If it finds any, it puts the
curly brackets that the parser expects around them.
For example, if "this is a fragment" is declared as a fragment somewhere and
the text this is a fragment
is detected in the rule file, it
has curly brackets placed around it.
ReferencePreprocessor
public ReferencePreprocessor()
process
public String process(String input)
process
public String process(String input,
String[] properties)
getFragmentNames
public String[] getFragmentNames(String input)
- Return all fragment names declared in a file
- Returns:
- the fragment names
Copyright © 2006-2010 Christian Nentwich and others