Beispiel #1
0
        private void Setup()
        {
            _startingAlpha = _alpha;

            _fileHandler.GetWordDictionaryFromFile(_wordCollection, MaxCodeLength);

            _wordCollection.RemoveWordsWithCountLessThanMinCount(_minCount);

            InitNetwork();

            if (_negative > 0)
            {
                InitUnigramTable();
            }
        }
Beispiel #2
0
        private void Setup()
        {
            _alpha = _startingAlpha;

            _fileHandler.GetWordDictionaryFromFile(_wordCollection, MaxCodeLength);

            // TODO: refactor the huffman stuff, so we can use it elsewhere
            _wordCollection.RemoveWordsWithCountLessThanMinCount(_minCount);
            var huffmanTree = new HuffmanTree();

            huffmanTree.Create(_wordCollection);

            InitNetwork();

            if (_negativeSamples > 0)
            {
                InitUnigramTable();
            }

            GC.Collect();
        }