Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.daisy.pipeline.nlp.impl.matchrules;
 
 import java.util.List;
 
Match compact abbreviations such as "etc.", but "e.t.c" does not match.
public class CompactAbbrMatchRule extends WordListMatchRule {
	public CompactAbbrMatchRule(Category categoryint priorityboolean caseSensitive,
	        MatchMode matchModeboolean capitalSensitiveLocale locale) {
		super(categoryprioritycaseSensitivematchModecapitalSensitivelocale);
	}
	public void init(Collection<StringrawAbbrs) {
		List<Stringabbrs = new ArrayList<String>();
		for (String prefix : rawAbbrs) {
			abbrs.add(prefix + ".");
		}
		super.init(abbrs);
	}
New to GrepCode? Check out our FAQ X