neighbor {word.alignment} | R Documentation |
Finding Neighborhood Locations
Description
Starting with the intersection of ef and fe alignment one by one and finding the square neighbors including the union and intersection, recursively.
Usage
neighbor(fe, ef, n.row)
Arguments
fe |
an integer vector. |
ef |
an integer vector. |
n.row |
an integer. Number of rows of an initial matrix. |
Value
An integer vector.
Author(s)
Neda Daneshgar and Majid Sarmad.
References
Koehn P. (2010), "Statistical Machine Translation.", Cambridge University, New York.
Examples
fe = c(1,4,2,4,2)
ef = c(3,2,1,5)
n.row = 4
neighbor (fe, ef, n.row)
[Package word.alignment version 1.1 Index]