<commit_before>/*
 * Copyright 1998 by <NAME>.  You can use this software freely so long as you preserve
 * the copyright notice and this restriction, and label your changes.
 */
package edu.brandeis.cs.steele.wn;

import java.util.*;
import edu.brandeis.cs.steele.util.Utils;


/** A <code>WordSense</code> represents the lexical information related to a specific sense of a {@link Word}.
 *
 * <code>WordSense</code>'s are linked by {@link Pointer}s into a network of lexically related <code>Synset</code>s
 * and <code>WordSense</code>s.
 * {@link WordSense#getTargets WordSense.getTargets()} retrieves the targets of these links, and
 * {@link WordSense#getPointers WordSense.getPointers()} retrieves the pointers themselves.
 *
 * @see Pointer
 * @see Synset
 * @see Word
 * @author <NAME>, <EMAIL>
 * @version 1.0
 */
public class WordSense implements PointerTarget, Comparable<WordSense> {
  /** 
   * <i>Optional</i> restrictions for the position of an adjective relative to the
   * noun it modifies. aka "adjclass".
   */
  public enum AdjPosition {
    NONE(0),
    /**
     * of adjectives; relating to or occurring within the predicate of a sentence
     */
    PREDICATIVE(1),
    /**
     * of adjectives; placed before the nouns they modify
     */
    ATTRIBUTIVE(2), // synonymous with PRENOMINAL
    //PRENOMINAL(2), // synonymous with ATTRIBUTIVE
    IMMEDIATE_POSTNOMINAL(4),
    ;
    final int flag;
    AdjPosition(final int flag) {
      this.flag = flag;
    }
    static boolean isActive(final AdjPosition adjPosFlag, final int flags) {
      return 0 != (adjPosFlag.flag & flags);
    }
  } // end enum AdjPosition

  //
  // Instance implementation
  //
  private final Synset synset;
  private final String lemma;
  private final int lexid;
  // only needs to be a byte since there are only 3 bits of flag values
  private final byte flags;<commit_msg>javadoc<commit_after>/*
 * Copyright 1998 by <NAME>.  You can use this software freely so long as you preserve
 * the copyright notice and this restriction, and label your changes.
 */
package edu.brandeis.cs.steele.wn;

import java.util.*;
import edu.brandeis.cs.steele.util.Utils;


/** A <code>WordSense</code> represents the lexical information related to a specific sense of a {@link Word}.
 *
 * <code>WordSense</code>'s are linked by {@link Pointer}s into a network of lexically related <code>Synset</code>s
 * and <code>WordSense</code>s.
 * {@link WordSense#getTargets WordSense.getTargets()} retrieves the targets of these links, and
 * {@link WordSense#getPointers WordSense.getPointers()} retrieves the pointers themselves.
 *
 * @see Pointer
 * @see Synset
 * @see Word
 * @author <NAME>, <EMAIL>
 * @version 1.0
 */
public class WordSense implements PointerTarget, Comparable<WordSense> {
  /** 
   * <i>Optional</i> restrictions for the position(s) an adjective can take
   * relative to the noun it modifies. aka "adjclass".
   */
  public enum AdjPosition {
    NONE(0),
    /**
     * of adjectives; relating to or occurring within the predicate of a sentence
     */
    PREDICATIVE(1),
    /**
     * of adjectives; placed before the nouns they modify
     */
    ATTRIBUTIVE(2), // synonymous with PRENOMINAL
    //PRENOMINAL(2), // synonymous with ATTRIBUTIVE
    IMMEDIATE_POSTNOMINAL(4),
    ;
    final int flag;
    AdjPosition(final int flag) {
      this.flag = flag;
    }
    static boolean isActive(final AdjPosition adjPosFlag, final int flags) {
      return 0 != (adjPosFlag.flag & flags);
    }
  } // end enum AdjPosition

  //
  // Instance implementation
  //
  private final Synset synset;
  private final String lemma;
  private final int lexid;
  // only needs to be a byte since there are only 3 bits of flag values
  private final byte flags;
{'fraction_non_alphanumeric': 0.10299973453676665, 'fraction_numerical': 0.006902044066896735, 'mean_word_length': 3.3211009174311927, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '976080', 'n_tokens_mistral': 1197, 'n_tokens_neox': 1156, 'n_words': 404}