All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.berkeley.nlp.util.IntPair Maven / Gradle / Ivy

Go to download

The Berkeley parser analyzes the grammatical structure of natural language using probabilistic context-free grammars (PCFGs).

The newest version!
package edu.berkeley.nlp.util;

import java.io.Serializable;

public class IntPair implements Serializable {
  private static final long serialVersionUID = 42;

  public IntPair() { }
  public IntPair(int first, int second) {
    this.first = first;
    this.second = second;
  }

  public String toString() {
    return first + "," + second;
  }

	public int hashCode() { return 29*first + second; }
  public boolean equals(Object o) {
    IntPair p = (IntPair)o;
    return first == p.first && second == p.second;
  }

  public int first, second;
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy