亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? namefinderme.java

?? 自然語(yǔ)言處理領(lǐng)域的一個(gè)開(kāi)發(fā)包
?? JAVA
字號(hào):
/////////////////////////////////////////////////////////////////////////////////Copyright (C) 2003 Thomas Morton// //This library is free software; you can redistribute it and/or//modify it under the terms of the GNU Lesser General Public//License as published by the Free Software Foundation; either//version 2.1 of the License, or (at your option) any later version.// //This library is distributed in the hope that it will be useful,//but WITHOUT ANY WARRANTY; without even the implied warranty of//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the//GNU Lesser General Public License for more details.// //You should have received a copy of the GNU Lesser General Public//License along with this program; if not, write to the Free Software//Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.//////////////////////////////////////////////////////////////////////////////package opennlp.tools.namefind;import java.io.File;import java.io.FileInputStream;import java.io.IOException;import java.io.InputStreamReader;import java.util.List;import java.util.Map;import opennlp.maxent.EventStream;import opennlp.maxent.GIS;import opennlp.maxent.GISModel;import opennlp.maxent.MaxentModel;import opennlp.maxent.PlainTextByLineDataStream;import opennlp.maxent.TwoPassDataIndexer;import opennlp.maxent.io.SuffixSensitiveGISModelWriter;import opennlp.tools.util.BeamSearch;import opennlp.tools.util.Sequence;/** * Class for creating a maximum-entropy-based name finder.   */public class NameFinderME implements NameFinder {  protected MaxentModel _npModel;  protected NameContextGenerator _contextGen;  private Sequence bestSequence;  private BeamSearch beam;  public static final String START = "start";  public static final String CONTINUE = "cont";  public static final String OTHER = "other";  /**   * Creates a new name finder with the specified model.   * @param mod The model to be used to find names.   */  public NameFinderME(MaxentModel mod) {    this(mod, new DefaultNameContextGenerator(10), 10);  }  /**   * Creates a new name finder with the specified model and context generator.   * @param mod The model to be used to find names.   * @param cg The context generator to be used with this name finder.   */  public NameFinderME(MaxentModel mod, NameContextGenerator cg) {    this(mod, cg, 10);  }  /**   * Creates a new name finder with the specified model and context generator.   * @param mod The model to be used to find names.   * @param cg The context generator to be used with this name finder.   * @param beamSize The size of the beam to be used in decoding this model.   */  public NameFinderME(MaxentModel mod, NameContextGenerator cg, int beamSize) {    _npModel = mod;    _contextGen = cg;    beam = new NameBeamSearch(beamSize, cg, mod, beamSize);  }    /* inherieted javadoc */  public List find(List toks, Map prevTags) {    bestSequence = beam.bestSequence(toks, new Object[] { prevTags });    return bestSequence.getOutcomes();  }  /* inherieted javadoc */  public String[] find(Object[] toks, Map prevTags) {    bestSequence = beam.bestSequence(toks, new Object[] { prevTags });    List c = bestSequence.getOutcomes();    return (String[]) c.toArray(new String[c.size()]);  }  /**    * This method determines wheter the outcome is valid for the preceeding sequence.     * This can be used to implement constraints on what sequences are valid.     * @param outcome The outcome.   * @param sequence The precceding sequence of outcomes assignments.    * @return true is the outcome is valid for the sequence, false otherwise.   */  protected boolean validOutcome(String outcome, Sequence sequence) {    if (outcome.equals(CONTINUE)) {      List tags = sequence.getOutcomes();      int li = tags.size() - 1;      if (li == -1) {        return false;      }      else if (((String) tags.get(li)).equals(OTHER)) {        return false;      }    }    return true;  }  /**    * Implementation of the abstract beam search to allow the name finder to use the common beam search code.    *   */  private class NameBeamSearch extends BeamSearch {    /**     * Creams a beam seach of the specified size sing the specified model with the specified context generator.     * @param size The size of the beam.     * @param cg The context generator used with the specified model.     * @param model The model used to determine names.     */    public NameBeamSearch(int size, NameContextGenerator cg, MaxentModel model, int beamSize) {      super(size, cg, model, beamSize);    }    protected boolean validSequence(int i, List sequence, Sequence s, String outcome) {      return validOutcome(outcome, s);    }  }  /**     * Populates the specified array with the probabilities of the last decoded sequence.  The     * sequence was determined based on the previous call to <code>chunk</code>.  The      * specified array should be at least as large as the numbe of tokens in the previous call to <code>chunk</code>.     * @param probs An array used to hold the probabilities of the last decoded sequence.     */  public void probs(double[] probs) {    bestSequence.getProbs(probs);  }    /**    * Returns an array with the probabilities of the last decoded sequence.  The    * sequence was determined based on the previous call to <code>chunk</code>.    * @return An array with the same number of probabilities as tokens were sent to <code>chunk</code>    * when it was last called.       */  public double[] probs() {    return bestSequence.getProbs();  }  private static GISModel train(EventStream es, int iterations, int cut) throws IOException {    return GIS.trainModel(iterations, new TwoPassDataIndexer(es, cut));  }    public static void usage(){    System.err.println("Usage: opennlp.tools.namefind.NameFinderME -encoding encoding training_file model");    System.exit(1);  }  public static void main(String[] args) throws IOException {    if (args.length == 0) {      usage();    }    try {      int ai=0;      String encoding = null;      while (args[ai].startsWith("-")) {        if (args[ai].equals("-encoding")) {          ai++;          if (ai < args.length) {            encoding = args[ai];            ai++;          }          else {            usage();          }        }      }      File inFile = new File(args[ai++]);      File outFile = new File(args[ai++]);      GISModel mod;      EventStream es = new NameFinderEventStream(new PlainTextByLineDataStream(new InputStreamReader(new FileInputStream(inFile),encoding)));      if (args.length > ai)        mod = train(es, Integer.parseInt(args[ai++]), Integer.parseInt(args[ai++]));      else        mod = train(es, 100, 5);      System.out.println("Saving the model as: " + outFile);      new SuffixSensitiveGISModelWriter(mod, outFile).persist();    }    catch (Exception e) {      e.printStackTrace();    }  }}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产亚洲一区二区三区 | 午夜视频在线观看一区二区三区| 国产精品影视在线| 精品理论电影在线| 国产在线麻豆精品观看| 国产欧美日韩综合| 色综合久久综合网欧美综合网| 亚洲国产精品影院| 日韩欧美国产一区二区在线播放| 美国毛片一区二区| 久久久久久电影| 99久久精品一区二区| 亚洲韩国精品一区| 久久夜色精品国产噜噜av| 国产福利一区在线| 尤物视频一区二区| 精品美女在线观看| 91视频观看免费| 亚洲午夜在线视频| 欧美成人激情免费网| 99re66热这里只有精品3直播| 亚洲一区二区三区四区中文字幕| 欧美一级国产精品| 成人福利视频在线看| 亚洲一二三区在线观看| 日韩欧美电影在线| av在线一区二区三区| 亚洲超丰满肉感bbw| 久久久精品综合| 欧洲精品一区二区三区在线观看| 精品一区二区三区免费视频| 亚洲色图在线视频| 日韩精品资源二区在线| 在线免费观看不卡av| 国产在线精品不卡| 亚洲高清视频中文字幕| 国产日韩欧美高清在线| 欧美精品电影在线播放| 99久久久免费精品国产一区二区 | 欧美成人精品1314www| 91丨porny丨蝌蚪视频| 美国精品在线观看| 亚洲午夜在线视频| 国产清纯美女被跳蛋高潮一区二区久久w | 久久久精品中文字幕麻豆发布| 色婷婷久久久综合中文字幕| 国产制服丝袜一区| 日本午夜精品一区二区三区电影| 国产精品国产自产拍高清av| 精品乱码亚洲一区二区不卡| 欧美色老头old∨ideo| 成人白浆超碰人人人人| 日本不卡123| 亚洲亚洲人成综合网络| 成人欧美一区二区三区视频网页 | 精品蜜桃在线看| 69av一区二区三区| 欧美日韩在线播放一区| 99re视频精品| 99视频一区二区三区| 国产美女一区二区| 久久99深爱久久99精品| 天天综合天天做天天综合| 一区二区三区视频在线观看| 中文字幕一区二区三区在线播放| 久久精品亚洲麻豆av一区二区| 日韩免费观看高清完整版在线观看| 欧美性受极品xxxx喷水| 色综合久久天天| 色香蕉成人二区免费| jlzzjlzz亚洲女人18| 国产馆精品极品| 丁香桃色午夜亚洲一区二区三区| 久久精品国产成人一区二区三区| 午夜激情一区二区三区| 天堂午夜影视日韩欧美一区二区| 一区二区三区欧美日| 亚洲精品国产第一综合99久久| 一区视频在线播放| 亚洲色图在线看| 亚洲成人动漫在线观看| 亚洲一区二区在线播放相泽| 亚洲午夜精品在线| 午夜精品aaa| 五月天激情综合| 免费观看一级特黄欧美大片| 美女任你摸久久| 国内偷窥港台综合视频在线播放| 精品亚洲aⅴ乱码一区二区三区| 久草这里只有精品视频| 国产91综合网| 91国产免费看| 6080亚洲精品一区二区| 欧美精品一区二区三| 欧美激情综合在线| 亚洲女性喷水在线观看一区| 亚洲va韩国va欧美va精品| 日本免费新一区视频| 精品一区二区综合| 99综合影院在线| 在线看国产日韩| 日韩午夜在线观看| 中文字幕不卡三区| 亚洲一区二区三区视频在线| 麻豆91在线观看| 成人国产精品免费观看动漫| 精品视频一区二区三区免费| 精品va天堂亚洲国产| 国产精品日产欧美久久久久| 亚洲成人av一区| 精品一二三四在线| 99热精品国产| 欧美一级免费观看| 国产精品网站在线| 三级欧美在线一区| 国产成人精品一区二区三区四区| 欧美性感一类影片在线播放| 精品福利二区三区| 一区二区三区**美女毛片| 国产在线播放一区二区三区| 在线日韩av片| 国产日韩欧美一区二区三区综合| 亚洲国产你懂的| 成人一区在线看| 日韩一级精品视频在线观看| 成人免费在线播放视频| 狠狠色丁香婷综合久久| 欧美色图片你懂的| 中文一区二区完整视频在线观看| 日韩精品1区2区3区| 91在线一区二区三区| 精品国产免费一区二区三区香蕉| 一区二区三区四区乱视频| 国产999精品久久| 制服丝袜中文字幕一区| 亚洲男人天堂av| 国产91露脸合集magnet| 欧美一级日韩免费不卡| 一区二区欧美国产| www.av亚洲| 亚洲国产精品成人久久综合一区| 日本三级亚洲精品| 欧美三级韩国三级日本一级| 综合电影一区二区三区| 成人综合婷婷国产精品久久蜜臀| 日韩三级伦理片妻子的秘密按摩| 亚洲国产精品天堂| 波多野结衣精品在线| 国产色产综合产在线视频| 久久精品国产精品亚洲综合| 欧美日韩在线免费视频| 一区二区成人在线| 99国产精品久久久久| 国产精品久久福利| 盗摄精品av一区二区三区| 国产欧美日韩激情| 国产成人av电影在线| 久久影院电视剧免费观看| 久久精品国内一区二区三区| 777午夜精品视频在线播放| 亚洲h在线观看| 欧美日韩精品二区第二页| 亚洲最新在线观看| 欧美成人一区二区三区| 蜜桃精品在线观看| 91精品啪在线观看国产60岁| 亚洲国产一区二区三区青草影视| 91黄色在线观看| 亚洲综合自拍偷拍| 欧美日精品一区视频| 亚洲电影在线免费观看| 91精品蜜臀在线一区尤物| 免费国产亚洲视频| 精品国产乱码久久久久久免费| 国内精品嫩模私拍在线| 国产亚洲成年网址在线观看| 国产.欧美.日韩| 亚洲欧洲三级电影| 欧美自拍偷拍一区| 热久久一区二区| 久久国产剧场电影| 精品1区2区在线观看| 国产黄色91视频| 亚洲精品乱码久久久久久久久| 欧美日韩综合在线| 精品综合久久久久久8888| 久久精品无码一区二区三区 | 91免费看片在线观看| 亚洲第一av色| www精品美女久久久tv| av午夜精品一区二区三区| 一区二区三区中文字幕精品精品 | 久久精品国产亚洲aⅴ| 国产偷国产偷精品高清尤物 | 亚洲h精品动漫在线观看| 日韩一区二区三区电影在线观看| 久久精品99国产国产精| 国产欧美va欧美不卡在线| 在线观看视频91| 国产在线麻豆精品观看|