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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ngrams.hpp

?? A C++ N-grams Package 2.0 This is a simple C++ n-grams package that includes a header, the correspo
?? HPP
字號:
//====// Ngrams.hpp// - defines class Ngrams which is//   - a statistical text n-grams extraction tool//   - based on Dr. Vlado Keselj's Perl Ngrams module in CPAN// Interface// - object construction//   - default is letter trigrams//     Ngrams ng;//   - letter 5-grams//     Ngrams ng(5);//   - letter unigrams to 5-grams (incremental)//     Ngrams ng(5, true);//   - word bigrams//     Ngrams ng(2, false, Ngrams::WORD_GRAM);//   - byte unigrams to 6-grams (incremental)//     Ngrams ng(6, true, Ngrams::BYTE_GRAM);// - n-gram collection//   - from a string literal//     ng.parse("this is a text");//   - from a standard string variable//     std::string str;//     ng.parse(str);//   - from an open text input stream//     std::ifstream fin("file.txt");//     ng.parse(fin);// - result output//   - output to a standard string//     std::string str;//     ng.store(str);//   - output to an open text file//     std::ofstream fout("myfile.txt");//     ng.store(fout);//   - output to the standard output//     ng.store(cout);//   - output in decreasing frequency order//     ng.store(str, Ngrams::ORDER_BY_FREQUENCY);//   - only output the 1000 most frequent n-grams//     ng.store(cout, Ngrams::ORDER_BY_FREQUENCY, 1000);//   - normalize frequency by total number of n-grams//     ng.store(str, 0, 500, Ngrams::NORMALIZE_BY_SUM);//   - normalize output by top frequency//     ng.store(fout, 1, 100, Ngrams::NORMALIZE_BY_MAX);// - self clean-up//   - useful in multiple file processing//     ng.parse(fin1);//     ng.store(fout1);//     ng.reset();//     ng.parse(fin2);//     ng.store(fout2);//     ng.reset();//     ...// Notes// - this package is provided as is with no warranty// - the author is not responsible for any damage caused//   either directly or indirectly by using this package// - anybody is free to do whatever he/she wants with this//   package as long as this header section is preserved// - the author would like to thank Dr. Vlado Keselj for//   providing his Perl module code as the main reference// Created on 2004-10-28 by// - Roger Zhang (rogerz@cs.dal.ca)// Modifications// - Roger Zhang on 2004-10-31//   - a static code map is used for encoding non-printables// - Roger Zhang on 2004-11-06//   - n-grams of size 1 to n-1 are always collected, but if//     they will be included in output can be decided by the//     user through the second argument of the store methods// - Roger Zhang on 2005-09-23//   - whether n-grams of size 1 to n-1 are collected is now//     decided at contruction time, which saves computation//     time and memory when those n-grams are not interested//   - a detailed class interface description is added// -// Last compiled under Linux with gcc-3//====#ifndef _NLP_NGRAMS_#define _NLP_NGRAMS_#include <iostream>#include <string>#include <deque>#include <map>namespace NLP{   class Ngrams   {      //====      // data members      int size, type, *pMax, *pTotal;      bool processingFile, incremental;      std::string *pStr;      std::deque<std::string> *pQue;      std::map<std::string, int> *pMap;      static std::map<char, std::string> encMap;      //====      // internal helper routines      void parseL(const std::string &s);      void parseB(const std::string &s, bool raw);      void parseW(const std::string &s);      void parseR(std::string *s, bool once);      void parseQ();      void storeK(void *buf, int o, int f, int n, bool toFile, int k);      void storeB(void *buf, int o, int f, int n, bool toFile);   public:      //====      // n-gram types      // - default is letter n-grams, which never needs to be specified      //   only alphabetical characters count in letter based n-grams      // - every single byte counts in byte based n-grams      // - the words in word n-grams consist of letters only, decimal      //   digits are replaced by <NUMBER>, everything else is ignored      static const int BYTE_GRAM = 1;      static const int WORD_GRAM = 2;      //====      // options on output order      // - default is ascending alphabetical order      // - by frequency means descending frequency order      static const int ORDER_BY_ALPHABET = 0;      static const int ORDER_BY_FREQUENCY = 1;      //====      // frequency normalization options      // - default is no normalization, which never needs to be specified      // - by max means dividing by top frequency      // - by sum means dividing by total number of (not unique) n-grams      static const int NORMALIZE_BY_MAX = 1;      static const int NORMALIZE_BY_SUM = 2;      //====      // examples      // - Ngrams ng3letter;      // - Ngrams ng2letter(2);      // - Ngrams ng5letter(5, false);      // - Ngrams ng3byte(3, true, Ngrams::BYTE_GRAM);      // - Ngrams ng2word(2, false, Ngrams::WORD_GRAM);      // notes      // - when "inc" is true, incremental collection starting from      //   unigrams will be performed, i.e. output will be n tables      explicit Ngrams(int n = 3, bool inc = false, int t = 0);      ~Ngrams();      //====      // examples      // - std::string text;      //   std::cin >> text;      //   ng.parse(text);      // - ng.parse("here's the text, blah blah ...");      void parse(const std::string &text);      //====      // examples      // - std::ifstream fin("myfile.txt");      //   ng.parse(fin);      // - ng.parse(cin);      // notes      // - supplied input stream must be readable      // - this method reads until the end of file      // - this method does not close the input stream      void parse(std::istream &in);      //====      // examples      // - std::string result;      //   ng.store(result);      // - ng.store(result, Ngrams::ORDER_BY_FREQUENCY);      // - ng.store(result, 0, 100);      // - ng.store(result, 0, 1000, Ngrams::NORMALIZE_BY_MAX);      // notes      // - existing contents of "str", if any, will not be touched      // - this method stores the n-grams table to the end of "str"      void store(         std::string &str,         int order = ORDER_BY_ALPHABET,         int first = 0,         int normalize = 0      ) { storeB(&str, order, first, normalize, false); }      //====      // examples      // - std::ofstream fout("myfile.txt");      //   ng.store(fout);      // - ng.store(cout, 0, 10, Ngrams::NORMALIZE_BY_SUM);      // notes      // - supplied output stream must be writable      // - this method does not close the output stream      void store(         std::ostream &out,         int order = ORDER_BY_ALPHABET,         int first = 0,         int normalize = 0      ) { storeB(&out, order, first, normalize, true); }      //====      // examples      // - ng.parse("some text ...");      //   ng.store(someString);      //   ng.reset();      //   ng.parse("some other text ...");      void reset();   }; // class Ngrams} // namespace NLP#endif // _NLP_NGRAMS_

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久精品免费观看| a4yy欧美一区二区三区| 欧美军同video69gay| 五月婷婷色综合| 欧美一区二区黄色| 美腿丝袜在线亚洲一区| 欧美精品一区二区三区在线| 国产一区二区美女| 中文字幕欧美日韩一区| 成人高清在线视频| 亚洲一区二区三区在线| 欧美日韩国产高清一区二区| 日韩激情视频网站| 国产日产欧美一区| 色婷婷综合中文久久一本| 精品一区二区三区免费视频| 精品欧美乱码久久久久久1区2区| 经典一区二区三区| 亚洲少妇30p| 在线成人午夜影院| 国产精品一色哟哟哟| 日韩一区欧美小说| 日韩一区二区精品| 成人免费高清视频在线观看| 一区av在线播放| 久久综合狠狠综合久久激情| 成人免费视频国产在线观看| 亚洲综合一区在线| 久久精品一区四区| 欧美午夜片在线看| 国产福利不卡视频| 亚洲愉拍自拍另类高清精品| 日韩精品一区二区三区在线播放| 成人精品高清在线| 亚洲成av人片在线| 国产亚洲一区字幕| 欧美午夜精品电影| 国产电影一区在线| 亚洲成人激情自拍| 国产精品国产成人国产三级 | www.日韩av| 日韩中文欧美在线| 国产精品传媒视频| 精品美女一区二区| 色婷婷av一区| 国产成人一级电影| 日本三级亚洲精品| 18成人在线视频| 26uuu亚洲| 7777女厕盗摄久久久| 97精品视频在线观看自产线路二| 久久成人麻豆午夜电影| 一区二区三区免费看视频| 久久久亚洲精品石原莉奈| 欧美日韩亚洲综合一区| 成人午夜私人影院| 国内外成人在线| 日韩国产精品久久| 亚洲一区二区三区小说| 国产精品久久久久久久久晋中| 日韩视频一区二区三区 | 亚洲不卡在线观看| 综合激情成人伊人| 中文字幕免费观看一区| 欧美mv日韩mv| 日韩欧美一区二区不卡| 欧美日本在线视频| 欧美日本国产视频| 欧洲av在线精品| 色婷婷综合久久| 99re这里只有精品首页| 成人免费高清视频| 福利一区二区在线| 国产成人啪免费观看软件| 九一久久久久久| 久久99精品久久久久久动态图| 日韩国产高清影视| 91丨porny丨在线| 国产不卡在线播放| 国产a级毛片一区| 国产suv精品一区二区三区| 国产一区二区三区不卡在线观看| 黄色日韩网站视频| 国产一区二区h| 国产福利一区二区三区视频在线| 精品综合免费视频观看| 精品亚洲免费视频| 国产精品一区一区| 成人听书哪个软件好| 99精品欧美一区二区三区小说| 91丝袜美腿高跟国产极品老师| 成人av在线网| 欧美午夜寂寞影院| 4438x亚洲最大成人网| 欧美成人性战久久| 久久精品一区二区三区不卡| 久久九九全国免费| 国产精品久久久久久户外露出| 中文字幕欧美日韩一区| 亚洲免费在线视频一区 二区| 亚洲一区在线观看视频| 日日摸夜夜添夜夜添亚洲女人| 另类小说视频一区二区| 国产精品66部| 在线视频欧美精品| 日韩欧美第一区| 欧美国产精品一区| 亚洲自拍偷拍图区| 精品中文av资源站在线观看| 成人综合婷婷国产精品久久蜜臀| 91麻豆免费观看| 欧美一区二区久久| 欧美激情艳妇裸体舞| 亚洲综合激情网| 国产一区二区网址| 色噜噜久久综合| 欧美xingq一区二区| 中文字幕中文在线不卡住| 亚洲高清视频在线| 国产精品资源在线| 欧美综合一区二区| 久久久五月婷婷| 亚洲福利一二三区| 国产成人aaa| 欧美精品第1页| 国产精品免费aⅴ片在线观看| 亚洲成人免费视| 成人免费观看男女羞羞视频| 欧美色综合久久| 国产精品热久久久久夜色精品三区| 亚洲伊人伊色伊影伊综合网| 国产精品综合在线视频| 欧美网站大全在线观看| 久久久蜜桃精品| 五月天中文字幕一区二区| 成人免费视频免费观看| 日韩欧美国产成人一区二区| 亚洲欧美视频在线观看视频| 久久99国内精品| 欧美日韩精品一二三区| 国产精品久久久久久久蜜臀| 免费xxxx性欧美18vr| 91蝌蚪porny| 中文字幕成人av| 韩日av一区二区| 69av一区二区三区| 亚洲激情在线播放| 国产成a人无v码亚洲福利| 日韩午夜电影在线观看| 一区二区三区不卡在线观看 | 成人看片黄a免费看在线| 7777精品伊人久久久大香线蕉最新版| 18涩涩午夜精品.www| 国产乱子轮精品视频| 制服丝袜成人动漫| 亚洲香肠在线观看| 91搞黄在线观看| 专区另类欧美日韩| 国产成人av电影| 久久精品日产第一区二区三区高清版 | 欧美一区二区三区在线观看| 亚洲精品免费在线| av在线播放成人| 日韩久久一区二区| 成人一道本在线| 国产精品美女久久久久久久网站| 国产一区二区不卡老阿姨| 精品不卡在线视频| 久久66热偷产精品| 日韩精品在线一区二区| 青娱乐精品视频在线| 欧美另类一区二区三区| 调教+趴+乳夹+国产+精品| 欧美日韩一卡二卡三卡| 亚洲成av人片在线观看无码| 欧美日韩国产另类不卡| 日韩电影一区二区三区四区| 欧美日本一区二区在线观看| 亚洲福利一二三区| 欧美一级搡bbbb搡bbbb| 久久精品72免费观看| 亚洲精品在线电影| 国产白丝网站精品污在线入口| 国产蜜臀av在线一区二区三区| 成人中文字幕电影| 亚洲卡通欧美制服中文| 欧美日韩国产高清一区二区| 奇米综合一区二区三区精品视频| 日韩视频在线你懂得| 国产一区在线视频| 国产精品视频在线看| 色偷偷久久人人79超碰人人澡| 亚洲一二三区在线观看| 91精品国产乱| 国产寡妇亲子伦一区二区| 日本一区二区三区四区在线视频 | 成人性生交大片免费看在线播放| 欧美国产精品劲爆| 欧美视频一区二区在线观看| 日韩电影在线观看一区|