1. 程式人生 > >OpenNLP最大熵框架中各類和方法功能註釋

OpenNLP最大熵框架中各類和方法功能註釋

1.BasicContextGenerator類:

(1)public String[] getContext(String o) ,將輸入的內容按照空格分割,並存到字串陣列中。

2.GIS類:

(1)GISModel trainModel(ObjectStream<Event> eventStream),用cutoff=0 迭代100的GIS演算法訓練得到模型,eventStream為要訓練的資料,訓練得到模型可以使用  GISModelWriter方法寫到磁盤裡(以下方法均可以)。

(2)GISModel trainModel(ObjectStream<Event> eventStream, boolean smoothing), smoothing 決定是否進行平滑。

(3)GISModel trainModel(ObjectStream<Event> eventStream, int iterations, int cutoff),開發人員可以自定義cutoff的值和迭代次數iterations。

(4)GISModel trainModel(ObjectStream<Event> eventStream, int iterations, int cutoff, boolean smoothing, boolean printMessagesWhileTraining),

   printMessagesWhileTraining自定義訓練時是否列印狀態資訊。

(5)GISModel trainModel(ObjectStream<Event> eventStream, int iterations, int cutoff, double sigma),sigma自定義高斯平滑的標準差。

(6)GISModel trainModel(int iterations, DataIndexer indexer), indexer用於event compilation的物件。

(7)GISModel trainModel(int iterations, DataIndexer indexer, boolean smoothing)。

(8)GISModel trainModel(int iterations, DataIndexer indexer, Prior modelPrior, int cutoff),modelPrior模型的先驗分佈。

(9)GISModel trainModel(int iterations, DataIndexer indexer, boolean printMessagesWhileTraining, boolean smoothing, Prior modelPrior)。

(10)GISModel trainModel(int iterations, DataIndexer indexer, boolean printMessagesWhileTraining, boolean smoothing, Prior modelPrior, int threads),threads執行緒數