Ejemplo n.º 1
0
        public bool ProcessTerm(ITokenSource source)
        {
            var term = new ArraySegmentKey <char>(source.Buffer, source.Size);

            if (_stopWords.Contains(term))
            {
                return(false);
            }
            return(true);
        }
Ejemplo n.º 2
0
        private bool Equals(ArraySegmentKey <T> other)
        {
            if (_buffer == null || other._buffer == null)
            {
                return(false);
            }
            if (_size != other._size)
            {
                return(false);
            }

            for (int i = 0; i < _size; i++)
            {
                if (_buffer[i].Equals(other._buffer[i]) == false)
                {
                    return(false);
                }
            }
            return(true);
        }