All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.berkeley.nlp.mapper.MapWorker Maven / Gradle / Ivy

Go to download

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