src/main/java/eu/digitisation/ngram/ContextLengthRange.java
public static ContextLengthRange parseContextLengthRange(
			String contextLengthRange) {
		Pattern clPattern = Pattern.compile("([1-9])-([1-9])");
		Matcher clMatcher = clPattern.matcher(contextLengthRange);
		if (clMatcher.find()) {
			return new ContextLengthRange(Integer.parseInt(clMatcher.group(1)),
					Integer.parseInt(clMatcher.group(2)));
		} else {
			throw new IllegalArgumentException(
					"Context length needs to be in format of [1-9]-[1-9]!");
		}
	}
/**
	 * Creates ContextLengthRange objects based on the provided string
	 * 
	 * @param contextLengthRange
	 *            context length range string which needs to follow the
	 *            following regex: [1-9]-[1-9] where the first digit is a start
	 *            and the second is end
	 * @return ContextLengthRange object created from the given string
	 */
Creates ContextLengthRange objects based on the provided string

@param contextLengthRange
context length range string which needs to follow the
following regex: [1-9]-[1-9] where the first digit is a start
and the second is end
@return ContextLengthRange object created from the given string
Creates ContextLengthRange objects based on the provided string @param contextLengthRange context length range string which needs to follow the following regex : [ 1 - 9 ] - [ 1 - 9 ] where the first digit is a start and the second is end @return ContextLengthRange object created from the given string
public static ContextLengthRange parseContextLengthRange(
			String contextLengthRange) {
		Pattern clPattern = Pattern.compile("([1-9])-([1-9])");
		Matcher clMatcher = clPattern.matcher(contextLengthRange);
		if (clMatcher.find()) {
			return new ContextLengthRange(Integer.parseInt(clMatcher.group(1)),
					Integer.parseInt(clMatcher.group(2)));
		} else {
			throw new IllegalArgumentException(
					"Context length needs to be in format of [1-9]-[1-9]!");
		}
	}
public static ContextLengthRange parseContextLengthRange ( String contextLengthRange ) { Pattern clPattern = Pattern . compile ( "([1-9])-([1-9])" ) ; Matcher clMatcher = clPattern . matcher ( contextLengthRange ) ; if ( clMatcher . find ( ) ) { return new ContextLengthRange ( Integer . parseInt ( clMatcher . group ( 1 ) ) , Integer . parseInt ( clMatcher . group ( 2 ) ) ) ; } else { throw new IllegalArgumentException ( "Context length needs to be in format of [1-9]-[1-9]!" ) ; } }
Creates ContextLengthRange objects based on the provided string
Creates ContextLengthRange objects based on the provided string