Package edu.smu.tspell.wordnet.impl.file

Examples of edu.smu.tspell.wordnet.impl.file.SenseIndexEntry


  {
    Synset synset = null;
    // All our word senses should point to the head; just use the first one
    SenseKey senseKey = getSenseKey(0);
    //  Get head synset information from the sense index file
    SenseIndexEntry indexEntry = getIndexEntry(senseKey);
    if (indexEntry != null)
    {
      //  Now get the sense key of the head synset
      SenseKey headKey = indexEntry.getSenseKey().getHeadWord();
      if (headKey != null)
      {
        //  Read head word entry from the sense index file
        SenseIndexReader reader = SenseIndexReader.getInstance();
        indexEntry = reader.getEntry(headKey.getFullSenseKeyText());
        if (indexEntry != null)
        {
          SynsetFactory factory = SynsetFactory.getInstance();
          synset = factory.getSynset(indexEntry.getSynsetPointer());
        }
        else
        {
          throw new RetrievalException("Unable to locate head word " +
              "entry for " + headKey + " referenced by " + this);
View Full Code Here

TOP

Related Classes of edu.smu.tspell.wordnet.impl.file.SenseIndexEntry

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.