/** * This method converts a comma-separated String (with whitespace * optionally allowed after the comma) representing properties * to a Properties object. Each property is "property=value". The value * for properties without an explicitly given value is set to "true". This can be used for a 2nd level * of properties, for example, when you have a commandline argument like "-outputOptions style=xml,tags". */ public static Properties stringToProperties(String str) { Properties result = new Properties(); return stringToProperties(str, result); }
public void setOptions(String options) { Properties prop = StringUtils.stringToProperties(options); tokenizeNLs = PropertiesUtils.getBool(prop, "tokenizeNLs", tokenizeNLs); } }
@Override public void setOptions(String options) { Properties prop = StringUtils.stringToProperties(options); tokenizeNLs = PropertiesUtils.getBool(prop, "tokenizeNLs", tokenizeNLs); }
public WhitespaceTokenizerFactory(LexedTokenFactory<T> factory, String options) { this.factory = factory; Properties prop = StringUtils.stringToProperties(options); this.tokenizeNLs = PropertiesUtils.getBool(prop, "tokenizeNLs", false); }
@Override public Tokenizer<T> getTokenizer(Reader r, String extraOptions) { Properties prop = StringUtils.stringToProperties(extraOptions); boolean tokenizeNewlines = PropertiesUtils.getBool(prop, "tokenizeNLs", this.tokenizeNLs); return new WhitespaceTokenizer<>(factory, r, tokenizeNewlines); }
public Tokenizer<HasWord> getTokenizer(Reader r, String extraOptions) { boolean tokenizeNewlines = this.tokenizeNLs; if (extraOptions != null) { Properties prop = StringUtils.stringToProperties(extraOptions); tokenizeNewlines = PropertiesUtils.getBool(prop, "tokenizeNLs", this.tokenizeNLs); } return new WordSegmentingTokenizer(segmenter, WhitespaceTokenizer.newCoreLabelWhitespaceTokenizer(r, tokenizeNewlines)); }
i += 2; } else if (args[i].equalsIgnoreCase("-evals")) { testOptions.evals = StringUtils.stringToProperties(args[i+1], testOptions.evals); i += 2; } else if (args[i].equalsIgnoreCase("-fastFactoredCandidateMultiplier")) {
formats = StringUtils.stringToProperties(formatString); options = StringUtils.stringToProperties(optionsString); List<String> okOutputs = Arrays.asList(outputTreeFormats); for (Object formObj : formats.keySet()) {
/** * This method converts a comma-separated String (with whitespace * optionally allowed after the comma) representing properties * to a Properties object. Each property is "property=value". The value * for properties without an explicitly given value is set to "true". This can be used for a 2nd level * of properties, for example, when you have a commandline argument like "-outputOptions style=xml,tags". */ public static Properties stringToProperties(String str) { Properties result = new Properties(); return stringToProperties(str, result); }
/** * This method converts a comma-separated String (with whitespace * optionally allowed after the comma) representing properties * to a Properties object. Each property is "property=value". The value * for properties without an explicitly given value is set to "true". This can be used for a 2nd level * of properties, for example, when you have a commandline argument like "-outputOptions style=xml,tags". */ public static Properties stringToProperties(String str) { Properties result = new Properties(); return stringToProperties(str, result); }
public void setOptions(String options) { Properties prop = StringUtils.stringToProperties(options); for (Map.Entry<Object,Object> item : prop.entrySet()) { String key = (String) item.getKey(); String value = (String) item.getValue(); boolean val = Boolean.valueOf(value); if(key.equals("tokenizeNLs")) tokenizeNLs = val; } } } // end class ArabicTokenizerFactory
public void setOptions(String options) { Properties prop = StringUtils.stringToProperties(options); for (Map.Entry<Object,Object> item : prop.entrySet()) { String key = (String) item.getKey(); String value = (String) item.getValue(); boolean val = Boolean.valueOf(value); if(key.equals("tokenizeNLs")) tokenizeNLs = val; } } } // end class WhitespaceTokenizerFactory
public void setOptions(String options) { Properties prop = StringUtils.stringToProperties(options); tokenizeNLs = PropertiesUtils.getBool(prop, "tokenizeNLs", tokenizeNLs); } }
public void setOptions(String options) { Properties prop = StringUtils.stringToProperties(options); tokenizeNLs = PropertiesUtils.getBool(prop, "tokenizeNLs", tokenizeNLs); } } // end class WhitespaceTokenizerFactory
public WhitespaceTokenizerFactory(LexedTokenFactory<T> factory, String options) { this.factory = factory; Properties prop = StringUtils.stringToProperties(options); this.tokenizeNLs = PropertiesUtils.getBool(prop, "tokenizeNLs", false); }
@Override public void setOptions(String options) { Properties prop = StringUtils.stringToProperties(options); tokenizeNLs = PropertiesUtils.getBool(prop, "tokenizeNLs", tokenizeNLs); }
public WhitespaceTokenizerFactory(LexedTokenFactory<T> factory, String options) { this.factory = factory; Properties prop = StringUtils.stringToProperties(options); this.tokenizeNLs = PropertiesUtils.getBool(prop, "tokenizeNLs", false); }
@Override public Tokenizer<T> getTokenizer(Reader r, String extraOptions) { Properties prop = StringUtils.stringToProperties(extraOptions); boolean tokenizeNewlines = PropertiesUtils.getBool(prop, "tokenizeNLs", this.tokenizeNLs); return new WhitespaceTokenizer<>(factory, r, tokenizeNewlines); }
public Tokenizer<T> getTokenizer(Reader r, String extraOptions) { Properties prop = StringUtils.stringToProperties(extraOptions); boolean tokenizeNewlines = PropertiesUtils.getBool(prop, "tokenizeNLs", this.tokenizeNLs); return new WhitespaceTokenizer<T>(factory, r, tokenizeNewlines); }
public Tokenizer<HasWord> getTokenizer(Reader r, String extraOptions) { boolean tokenizeNewlines = this.tokenizeNLs; if (extraOptions != null) { Properties prop = StringUtils.stringToProperties(extraOptions); tokenizeNewlines = PropertiesUtils.getBool(prop, "tokenizeNLs", this.tokenizeNLs); } return new WordSegmentingTokenizer(segmenter, WhitespaceTokenizer.newCoreLabelWhitespaceTokenizer(r, tokenizeNewlines)); }