You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Zero/ZeroLevel/Services/Semantic/CValue/Term.cs

73 lines
1.3 KiB

5 years ago
using System;
namespace ZeroLevel.Services.Semantic.CValue
{
public class Term
{
private String term;
private float score;
public Term()
{
}
public Term(String pTerm)
{
term = pTerm;
score = -1;
}
public Term(String pTerm, float pScore)
{
term = pTerm;
score = pScore;
}
public String getTerm()
{
return term;
}
public void setTerm(String term)
{
this.term = term;
}
public float getScore()
{
return score;
}
public void setScore(float score)
{
this.score = score;
}
public override string ToString()
{
return term + "\t" + score;
}
public override bool Equals(object obj)
{
return Equals(obj as Term);
}
private bool Equals(Term other)
{
if (other == null) return false;
return this.term.Equals(other.term, StringComparison.OrdinalIgnoreCase);
}
public override int GetHashCode()
{
int hash = 7;
hash = 97 * hash + this.term.GetHashCode();
return hash;
}
}
}

Powered by TurnKey Linux.