Method | Description | |
---|---|---|
GetParameterCache ( List |
||
MatchSubtitles ( SubtitleMatcherCache cache ) : LinkedList |
Matches the two subtitles. The problem is that no two subtiles have the same timestamps or the same number of lines (they can be split, omitted, ...). This algotithm tries to find matching lines nontheless. The general algorithm works as following: Compare every "line1" in list1 with every "line2" in list2. Generate a score (between 0 and 1) how good they overlap. If the score is above a certain threshold, there will be an edge (as in graph theory) beween line1 and line2. There result is a bipartite graph that has many connected compontens. Every connected component is then a mached line. There is another step that removes matchings where two lines in same list overlap. See documentation of "RemoveOverlappings()" for more information.
|
Method | Description | |
---|---|---|
FindBidirectionalMapping ( List |
||
FindMatching ( List |
This creates a list of good matching lines between primaryList and secondaryList.
|
|
GetLeastFittingLine ( LineInfo lineInfo, LinkedList |
Returns the line from "matching lines" that has the least overlapping rating with "lineInfo".
|
|
RemoveOverlappings ( List |
Removes the overlappings in one list. Example: sub1 is in list1 sub2 and sub3 are in list2 sub1 overlaps with sub2, sub3 + sub2 and sub3 overlap An example of this in the real worlds are announcements while the main characters are speaking. We obviously only want to map the character-dialog and the announcement to its own translation.
|
public static GetParameterCache ( List |
||
lines1 | List |
|
lines2 | List |
|
return | SubtitleMatcherCache |
public static MatchSubtitles ( SubtitleMatcherCache cache ) : LinkedList |
||
cache | SubtitleMatcherCache | |
return | LinkedList |