![JAR search and dependency download from the Maven repository](/logo.png)
edu.berkeley.nlp.mapper.MapWorker Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of berkeleyparser Show documentation
Show all versions of berkeleyparser Show documentation
The Berkeley parser analyzes the grammatical structure of natural language using probabilistic context-free grammars (PCFGs).
The newest version!
package edu.berkeley.nlp.mapper;
import java.util.ArrayList;
import java.util.List;
/**
* The only method you need to implement is map(Item item);
* @author aria42
*
* @param -
*/
public abstract class MapWorker
- implements Runnable, SimpleMapper
- {
protected List
- items = new ArrayList
- ();
public void setItems(List
- items) {
this.items = items;
}
public void addItem(Item item) {
items.add(item);
}
public void run() {
for (Item item: items) {
map(item);
}
}
public void reduce() { }
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy