public BilingualAlignmentService create ( ) { Preconditions . checkArgument ( sourceCorpus . isPresent ( ) , "No source indexed corpus given" ) ; Preconditions . checkArgument ( dico . isPresent ( ) , "No bilingual dictionary given" ) ; Preconditions . checkArgument ( targetCorpus . isPresent ( ) , "No target indexed corpus given" ) ; Injector sourceInjector = TermSuiteFactory . createExtractorInjector ( sourceCorpus . get ( ) ) ; Injector targetInjector = TermSuiteFactory . createExtractorInjector ( targetCorpus . get ( ) ) ; AlignerModule alignerModule = new AlignerModule ( sourceInjector , targetInjector , dico . get ( ) , distance ) ; Injector alignerInjector = Guice . createInjector ( alignerModule ) ; BilingualAlignmentService alignService = alignerInjector . getInstance ( BilingualAlignmentService . class ) ; return alignService ; }
Creates the bilingual single - word aligner .