powered by
Starting with the intersection of ef and fe alignment one by one and finding the square neighbors including the union and intersection, recursively.
neighbor(fe, ef, n.row)
an integer vector.
an integer. Number of rows of an initial matrix.
An integer vector.
Koehn P. (2010), "Statistical Machine Translation.", Cambridge University, New York.
# NOT RUN { fe = c(1,4,2,4,2) ef = c(3,2,1,5) n.row = 4 neighbor (fe, ef, n.row) # }
Run the code above in your browser using DataLab