是实体的一部分
@param pos
@param word
@return
973578
private boolean isPart(PartOfSpeech pos, String word){
		if(NP.contains(pos))
			return true;
		
		if(pos == PartOfSpeech.结构助词 && word.equals("的"))
			return true;
		
		return false;
	}
596331
public String tag(final String word, final String postag) {
    // lookup postag as value of the map
    String newPosTag = this.dictMap.get(word.toLowerCase());
    if (newPosTag == null) {
      newPosTag = postag;
    }
    return newPosTag;
  }
194796
protected boolean place(final Word word, final Point start) {
        final Graphics graphics = this.bufferedImage.getGraphics();

        final int maxRadius = computeRadius(dimension, start);
        final Point position = word.getPosition();
        
        for (int r = 0; r < maxRadius; r += 2) {
            for (int x = Math.max(-start.x, -r); x <= Math.min(r, dimension.width - start.x - 1); x++) {
                position.x = start.x + x;

                final int offset = (int) Math.sqrt(r * r - x * x);
                
                // try positive root
                position.y = start.y + offset;
                if (position.y >= 0 && position.y < dimension.height && canPlace(word)) {
                    collisionRaster.mask(word.getCollisionRaster(), position);
                    graphics.drawImage(word.getBufferedImage(), position.x, position.y, null);
                    return true;
                }
                
                // try negative root (if offset != 0)
                position.y = start.y - offset;
                if (offset != 0 && position.y >= 0 && position.y < dimension.height && canPlace(word)) {
                    collisionRaster.mask(word.getCollisionRaster(), position);
                    graphics.drawImage(word.getBufferedImage(), position.x, position.y, null);
                    return true;
                }
            }
        }

        return false;
    }
816552
public double[] getWordVector(String word) {
        INDArray r = getWordVectorMatrix(word);
        if (r == null)
            return null;
        return r.dup().data().asDouble();
    }
1174015
def pos(self, element = None):
		'''  '''

		tags = []
		if element:
			if element.startswith(('der', 'die', 'das')):
				tags.append('NN')
			if ' VERB' in element:
				tags.append('VB')
			if ' ADJ' in element:
				tags.append('JJ')
		else:
			for element in self.elements:
				if self.word in unicode(element):
					return self.pos(element)
		return tags
691206
public void add(String word)
    {
        word = reverse(word);
        trie.put(word, word.length());
    }
419210
public Token add( String word ) {
        Token t = new Token(word);
        push( t );
        return t;
    }
507015
public char charAt(int pos)
  {
    int startChunk = pos >>> m_chunkBits;

    if (startChunk == 0 && m_innerFSB != null)
      return m_innerFSB.charAt(pos & m_chunkMask);
    else
      return m_array[startChunk][pos & m_chunkMask];
  }
176458
public static List<Element> wordAlert(String word) {

		char[] chars = WordAlert.alertStr(word);

		List<Element> list = new ArrayList<Element>();

		StringBuilder tempSb = new StringBuilder();

		int status = 0; // 1 num 2 english

		Element element = null;

		for (int i = 0; i < chars.length; i++) {

			if (chars[i] >= '0' && chars[i] <= '9') {
				if (status == 2) {
					element = new Element(Config.getNum(tempSb.toString()));
					element.len = tempSb.length();
					list.add(element);
					tempSb = new StringBuilder();
				}
				tempSb.append(chars[i]);
				status = 1;
			} else if (chars[i] >= 'A' && chars[i] <= 'z') {
				if (status == 1) {
					element = new Element(Config.getEn(tempSb.toString()));
					element.len = tempSb.length();
					list.add(element);
					tempSb = new StringBuilder();
				}
				tempSb.append(chars[i]);
				status = 2;
			} else {
				if (status == 1) {
					element = new Element(Config.getNum(tempSb.toString()));
					element.len = tempSb.length();
					list.add(element);
				} else if (status == 2) {
					element = new Element(Config.getEn(tempSb.toString()));
					element.len = tempSb.length();
					list.add(element);
				}
				tempSb = new StringBuilder();
				list.add(new Element(chars[i]));
				status = 0;
			}

		}

		if (tempSb.length() > 0) {
			if (status == 1) {
				element = new Element(Config.getNum(tempSb.toString()));
				element.len = tempSb.length();
				list.add(element);
			} else if (status == 2) {
				element = new Element(Config.getEn(tempSb.toString()));
				element.len = tempSb.length();
				list.add(element);
			} else {
				LOG.error("err! status :"+status);
			}
		}

		return list;
	}
1169337
public String[] getTags(String word) {
    if (caseSensitive) {
      return (String[]) dictionary.get(word);
    }
    else {
      //System.err.println(java.util.Arrays.asList((String[]) dictionary.get(word.toLowerCase())));
      return (String[]) dictionary.get(word.toLowerCase());
    }
  }
826862
def positions(self, word):
        
        right = len(word) - self.right
        return [i for i in self.hd.positions(word) if self.left <= i <= right]
594198
public static int findWordStart(String text, int pos, String noWordSep) {
        return findWordStart(text, pos, noWordSep, true, false);
    }
1250646
public boolean endsWith(String word)
    {
        word = reverse(word);
        return trie.commonPrefixSearchWithValue(word).size() > 0;
    }
608714
function(text, pos) {
			var result = this.find(text, pos);
			if (result && result.type == 'tag') {
				return result;
			}
		}
97077
private void addWord(final String word) {

		final int length = word.length();
		if (length >= wordMinLength && length <= wordMaxLength) {

			words.add(word);

			wordCount++;
		}
	}
239651
public static String insert(final String str, final String c, final int pos) {
    if (str.length() < pos) { return str; }
    return str.substring(0, pos - 1) + c + str.substring(pos);
  }
972198
private boolean isNotCompound(String word) throws IOException {
    List<String> probablyCorrectWords = new ArrayList<>();
    List<String> testedTokens = new ArrayList<>(2);
    for (int i = 2; i < word.length(); i++) {
      // chop from left to right
      final String first = word.substring(0, i);
      final String second = word.substring(i, word.length());
      if (prefixes.contains(first.toLowerCase(conversionLocale))
              && !isMisspelled(speller1, second)
              && second.length() > first.length()) { // but not for short words such as "premoc"
        // ignore this match, it's fine
        probablyCorrectWords.add(word); // FIXME: some strange words are being accepted, like prekupa
      } else {
        testedTokens.clear();
        testedTokens.add(first);
        testedTokens.add(second);
        List<AnalyzedTokenReadings> taggedToks =
                language.getTagger().tag(testedTokens);
        if (taggedToks.size() == 2
                // "białozielony", trzynastobitowy
                && (taggedToks.get(0).hasPosTag("adja")
                || (taggedToks.get(0).hasPosTag("num:comp")
                   && !taggedToks.get(0).hasPosTag("adv")))
                && taggedToks.get(1).hasPartialPosTag("adj:")) {
          probablyCorrectWords.add(word);
        }
      }
    }
    if (!probablyCorrectWords.isEmpty()) {
      addIgnoreTokens(probablyCorrectWords);
      return false;
    }
    return true;
  }