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

gate.plugin.learningframework.mallet.LFInstanceList Maven / Gradle / Ivy

Go to download

A GATE plugin that provides many different machine learning algorithms for a wide range of NLP-related machine learning tasks like text classification, tagging, or chunking.

There is a newer version: 4.2
Show newest version
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package gate.plugin.learningframework.mallet;

import cc.mallet.types.Instance;
import cc.mallet.types.InstanceList;

/**
 * A concurrent replacement for Mallet InstanceList.
 * This tries in a naive way to synchronize some access to the list (but not all).
 * Most importantly the add(Instance) method is synchronized.
 * 
 * @author JohannPetrak
 */
public class LFInstanceList extends InstanceList {
  
  public LFInstanceList(LFPipe pipe) {
    super(pipe);
  }
  
  
  private static final long serialVersionUID = 4320038272253815542L;
  
  @Override
  public synchronized boolean add(Instance instance) {
    return super.add(instance);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy