Пример #1
0
            internal MiddleNgramSet(NgramTrie ngramTrie, int num, int num2, int num3, int num4, int num5) : base(ngramTrie, num, num4, num2 + NgramTrie.access_000(ngramTrie, num5))
            {
                this.nextMask = (1 << NgramTrie.access_000(ngramTrie, num5)) - 1;
                if (num3 + 1 >= 33554432 || num5 >= 33554432)
                {
                    string text = "Sorry, current implementation doesn't support more than 33554432 n-grams of particular order";

                    throw new Error(text);
                }
            }
Пример #2
0
            internal NgramSet(NgramTrie ngramTrie, int num, int num2, int num3)
            {
                this.this_0   = ngramTrie;
                this.maxVocab = num2;
                this.memPtr   = num;
                this.wordBits = NgramTrie.access_000(ngramTrie, num2);
                if (this.wordBits > 25)
                {
                    string text = "Sorry, word indices more than33554432 are not implemented";

                    throw new Error(text);
                }
                this.totalBits = this.wordBits + num3;
                this.wordMask  = (1 << this.wordBits) - 1;
                this.insertIdx = 0;
            }