|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthultig.align.NWunsch
public class NWunsch
This class contains an implementation of the Needleman Wunsch algorithm for globally align sequence pairs (the whole sequences). This algorithm have been used for DNA sequence alignment, in genetics, and is here adapted for the alignment of words, between sentence pairs.
University of Beira Interior (UBI)
Centre For Human Language Technology and Bioinformatics (HULTIG)
Constructor Summary | |
---|---|
NWunsch(int[] sa,
int[] sb)
|
|
NWunsch(Sentence sa,
Sentence sb)
|
|
NWunsch(String sa,
String sb)
|
Method Summary | |
---|---|
void |
buildAlignment()
|
void |
buildMatrix()
Compute the similarity matrix, using dynamic programming strategy. |
String |
codes2str(int[] vs)
|
static void |
computeAlignOut(Text txt,
int idpar)
|
String[] |
getAlignmentH()
|
CorpusIndex |
getDict()
|
static void |
main(String[] args)
|
static void |
mainX(String[] args)
|
static void |
mainX1(String[] args)
|
void |
printAlignmentH(int idpar)
|
void |
printAlignmentV()
|
void |
printMatrix()
|
void |
printMatrixLatex()
Print the alignment matrix to be used in Latex. |
void |
printvectors()
|
static boolean |
processParaFile(String filename)
To process a paraphrase file. |
void |
setDic(CorpusIndex dict)
|
double |
similarity(int i,
int j)
Define metrica de distância entre "simbolos" do alfabeto. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NWunsch(int[] sa, int[] sb)
public NWunsch(String sa, String sb)
public NWunsch(Sentence sa, Sentence sb)
Method Detail |
---|
public void setDic(CorpusIndex dict)
public CorpusIndex getDict()
public String codes2str(int[] vs)
public double similarity(int i, int j)
i
- intj
- int
public void buildMatrix()
public void buildAlignment()
public String[] getAlignmentH()
public void printAlignmentH(int idpar)
public void printAlignmentV()
public void printvectors()
public void printMatrix()
public void printMatrixLatex()
public static boolean processParaFile(String filename)
filename
- String
public static void computeAlignOut(Text txt, int idpar)
public static void main(String[] args)
public static void mainX1(String[] args)
public static void mainX(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |