Skip to content

Commit

Permalink
update NGrams preconditions
Browse files Browse the repository at this point in the history
  • Loading branch information
nevillelyh committed Jan 8, 2018
1 parent 9b02706 commit 36a7f4d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ object NGrams {
def apply(name: String, low: Int = 1, high: Int = -1, sep: String = " ")
: Transformer[Seq[String], Set[String], SortedMap[String, Int]] = {
require(low > 0, "low must be > 0")
require(high > 0 || high == -1, "high must > 0 or -1")
require(high >= low || high == -1, "high must >= low or -1")
new NGrams(name, low, high, sep)
}
}
Expand Down

0 comments on commit 36a7f4d

Please sign in to comment.