edu.washington.cs.knowitall.extractor.mapper
Class BracketsRemover
java.lang.Object
edu.washington.cs.knowitall.extractor.mapper.Mapper<T>
edu.washington.cs.knowitall.extractor.mapper.IndependentMapper<String>
edu.washington.cs.knowitall.extractor.mapper.BracketsRemover
public class BracketsRemover
- extends IndependentMapper<String>
Removes square brackets, curly braces, parentheses, and the contained text,
from strings.
- Author:
- afader
|
Method Summary |
String |
doMap(String sent)
Returns a copy of sent with its brackets, and the contained
text, removed. |
static void |
main(String[] args)
Applies the BracketsRemover mapper to each line in standard
input and prints the result. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BracketsRemover
public BracketsRemover(String[] startBrackets,
String[] endBrackets)
- Constructs a new
BracketsRemover object.
BracketsRemover
public BracketsRemover()
doMap
public String doMap(String sent)
- Returns a copy of
sent with its brackets, and the contained
text, removed.
- Specified by:
doMap in class IndependentMapper<String>
main
public static void main(String[] args)
throws IOException
- Applies the
BracketsRemover mapper to each line in standard
input and prints the result.
- Parameters:
args -
- Throws:
IOException
Copyright © 2010-2012 University of Washington CSE. All Rights Reserved.