Package net.didion.jwnl.data

Examples of net.didion.jwnl.data.POS


  }

  @SuppressWarnings("unchecked")
  public String[] getLemmas(String word, String tag) {
    try {
      POS pos;
      if (tag.startsWith("N") || tag.startsWith("n")) {
        pos = POS.NOUN;
      }
      else if (tag.startsWith("N") || tag.startsWith("v")) {
        pos = POS.VERB;
View Full Code Here


    morphy = dict.getMorphologicalProcessor();
  }

  public String[] getLemmas(String word, String tag) {
    try {
      POS pos;
      if (tag.startsWith("N") || tag.startsWith("n")) {
        pos = POS.NOUN;
      }
      else if (tag.startsWith("N") || tag.startsWith("v")) {
        pos = POS.VERB;
View Full Code Here

  }

  @SuppressWarnings("unchecked")
  public String[] getLemmas(String word, String tag) {
    try {
      POS pos;
      if (tag.startsWith("N") || tag.startsWith("n")) {
        pos = POS.NOUN;
      }
      else if (tag.startsWith("V") || tag.startsWith("v")) {
        pos = POS.VERB;
View Full Code Here

     * @throws JWNLException
     *             On problems on WordNet lookup
     */
    public IndexWord getRandomWord(boolean hard) throws JWNLException {
        int n = r.nextInt(4);
        POS toPick = null;
        switch (n) {
        case 0:
            toPick = POS.ADJECTIVE;
            break;
        case 1:
View Full Code Here

            Iterator iter = words.getIndexWordCollection().iterator();
            IndexWord word;
            while (iter.hasNext()) {
                word = (IndexWord) iter.next();
                if (word != null) {
                    POS r = word.getPOS();
                    if (r.equals(POS.NOUN) || r.equals(POS.VERB)
                            || r.equals(POS.ADJECTIVE) || r.equals(POS.ADVERB))
                        return true;
                }
            }
        } catch (JWNLException e) {
            e.printStackTrace();
View Full Code Here

   *
   * @throws Exception
   */
  public void insertData() throws Exception {
    TIME = System.currentTimeMillis();
    POS pos;
    for (@SuppressWarnings("rawtypes")
    Iterator posItr = POS.getAllPOS().iterator(); posItr.hasNext(); LOG
        .log(MessageLogLevel.INFO, "done inserting data for pos " + pos)) {
      pos = (POS) posItr.next();
      LOG.log(MessageLogLevel.INFO, "inserting data for pos " + pos);
View Full Code Here

  }

  @SuppressWarnings("unchecked")
  public String[] getLemmas(String word, String tag) {
    try {
      POS pos;
      if (tag.startsWith("N") || tag.startsWith("n")) {
        pos = POS.NOUN;
      } else if (tag.startsWith("N") || tag.startsWith("v")) {
        pos = POS.VERB;
      } else if (tag.startsWith("J") || tag.startsWith("a")) {
View Full Code Here

TOP

Related Classes of net.didion.jwnl.data.POS

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.