/** * Constructor for reflection loading. * * @param args */ public DiscriminativeAlignments(String... args) { Properties options = FeatureUtils.argsToProperties(args); this.addSourceDeletions = options.containsKey("sourceDeletionFeature"); this.addTargetInsertions = options.containsKey("targetInsertionFeature"); this.useClasses = options.containsKey("useClasses"); if (useClasses) { sourceMap = SourceClassMap.getInstance(); targetMap = TargetClassMap.getInstance(); } }
private String sourceRepresentation(IString token) { return useClasses ? sourceMap.get(token).toString() : token.toString(); }