Package edu.smu.tspell.wordnet

Examples of edu.smu.tspell.wordnet.SynsetType


  private void loadExceptions() throws RetrievalException
  {
    String keyText;
    int typeNumber;
    String fileName;
    SynsetType type;

    Enumeration keys = TYPE_FILES.getKeys();
    while (keys.hasMoreElements())
    {
      keyText = (String)(keys.nextElement());
View Full Code Here


    String lexicalSense = keyText.substring(index + 1);
    StringTokenizer tokenizer =
        new StringTokenizer(lexicalSense, SenseKey.FIELD_DELIMITER);
    //  Synset type (e.g., "5")
    int synsetType = Integer.parseInt(tokenizer.nextToken());
    SynsetType type = SynsetTypeConverter.getType(synsetType);
    //  Lexical file number (e.g., "00")
    int lexFileNum = Integer.parseInt(tokenizer.nextToken());
    //  Lexical ID that combines with lemma to identify a sense
    int lexID = Integer.parseInt(tokenizer.nextToken());
    //  Head word for adjective satellite synset (e.g., "enthusiastic")
View Full Code Here

    String[] keyText;
    String[] templates;

    RelationshipType relationship;
    int targetOffset;
    SynsetType type;
    String sourceTarget;
    int sourceWord, targetWord;
    SynsetPointer pointer;
    WordSensePointer sensePointer;
    String nextToken;
    String frameText;
    Synset synset;

    StringTokenizer tokenizer = new StringTokenizer(data, FIELD_DELIMITER);
    //  Synset offset (e.g., "06550953"); not used.
    int offset = Integer.parseInt(tokenizer.nextToken());
    //  Lexical file number (e.g, "10"); also not used.
    int lexicalFile = Integer.parseInt(tokenizer.nextToken());
    //  Synset type (e.g., "n").
    char synsetTypeCode = tokenizer.nextToken().charAt(0);
    //  Convert the category type code and create a synset instance
    SynsetType synsetType = SynsetTypeConverter.getType(synsetTypeCode);
    //  Word form count (e.g., "2").
    int wordCount = Integer.parseInt(tokenizer.nextToken(), HEX);
    senseKeys = new SenseKey[wordCount];
    SampleIndexFactory indexFactory = SampleIndexFactory.getInstance();
    SampleTemplateFactory templateFactory =
View Full Code Here

   * @param  typeNumber Numeric code for which to return the type.
   * @return Synset type matching the specified numeric code.
   */
  public static SynsetType getType(int typeNumber)
  {
    SynsetType type = null;
    SynsetType[] types = SynsetType.ALL_TYPES;

    for (int i = 0; i < types.length; i++)
    {
      if (typeNumber == types[i].getCode())
View Full Code Here

   *         to return the syntactic category.
   * @return Type associated with the specified part of speech.
   */
  public static SynsetType getType(char partOfSpeechCode)
  {
    SynsetType type = null;

    switch (partOfSpeechCode)
    {
      case NOUN_CODE:
        type = SynsetType.NOUN;
View Full Code Here

   * @return Newly created map containing the synset entries for the word.
   */
  private Map loadSynsets(String wordForm) throws WordNetException
  {
    Synset synset;
    SynsetType type;
    List categoryList;

    //  Create a new entry for the word form in the map
    Map subMap = new TreeMap();
    //  Read lines from the sense index that correspond to the word form
View Full Code Here

TOP

Related Classes of edu.smu.tspell.wordnet.SynsetType

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.