コード例 #1
0
        public Car(ICarFactory factory)
        {
            _engine = factory.MakeEngine();
            _corpus = factory.MakeCorpus();

            Console.WriteLine("Honda created");
        }
コード例 #2
0
ファイル: Analyzer.cs プロジェクト: yamashi/NLP-Polarity
 public Analyzer(IDictionary<string, uint> pos, IDictionary<string, uint> neg, IDictionary<string, uint> neu, ICorpus cor)
 {
     corpus = cor;
     positive = pos;
     negative = neg;
     neutral = neu;
 }
コード例 #3
0
ファイル: Crawler.cs プロジェクト: Kooldeji/WebSpy
        public Crawler(ICorpus corpus)
        {
            timer           = new Timer(30000);
            timer.AutoReset = true;
            timer.Elapsed  += execute;

            _corpus = corpus;
            init();
            //while (res.Status != TaskStatus.RanToCompletion) ;
        }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Ranker"/> class.
 /// </summary>
 /// <param name="query">A mapping of each query term to the frequency in the query document.</param>
 public Ranker(ICorpus corpus, Tuple <int, List <ITermDocument> > query)
 {
     if (query == null || corpus == null)
     {
         throw new ArgumentNullException();
     }
     this._queryRank = new Dictionary <string, double>();
     _corpus         = corpus;
     _documentRank   = new Dictionary <string, Dictionary <string, double> >();
     _documents      = new HashSet <string>();
     RankList        = new List <KeyValuePair <String, double> >();
     CompTF_IDF(query);
     Rank();
 }
コード例 #5
0
 public SpellCorrect(ICorpus corpus)
 {
     this.corpus = corpus;
 }
コード例 #6
0
 public SpellCorrect(ICorpus corpus)
 {
     this.corpus = corpus;
 }
コード例 #7
0
 public IAnnotatedCorpus Analyse(ICorpus corpus)
 {
     throw new NotImplementedException();
 }
コード例 #8
0
ファイル: Indexer.cs プロジェクト: Kooldeji/WebSpy
 /// <summary>
 /// Initializes a new instance of the <see cref="Indexer"/> class.
 /// </summary>
 /// <param name="corpus">The corpus. Instantiates the corpus</param>
 public Indexer(ICorpus corpus)
 {
     _corpus    = corpus;
     _tokenizer = new Tokenizer(corpus.StopWords);
     _repo      = _corpus.GetRepository().Result;
 }
コード例 #9
0
ファイル: Querier.cs プロジェクト: Kooldeji/WebSpy
 public Querier(ICorpus corpus)
 {
     _corpus    = corpus;
     _tokenizer = new Tokenizer(corpus.StopWords);
 }
コード例 #10
0
        public IAnnotatedCorpus Analyse(ICorpus corpus)
        {
            Analyzer analyzer = new Analyzer(positive, negative, neutral, corpus);

            return analyzer.Result();
        }
コード例 #11
0
 public WordCountKernel(ICorpus corpus)
 {
     _corpus = corpus;
 }