diff options
author | Rocky Madden <git@rockymadden.com> | 2013-12-28 12:12:12 -0700 |
---|---|---|
committer | Rocky Madden <git@rockymadden.com> | 2013-12-28 12:12:12 -0700 |
commit | a43a304694dbf2b1a02854861cbae2569668d9f8 (patch) | |
tree | a1938356052e3963a087482ab0b59610da8035ee /core/source | |
parent | 63edd09d2f77fbd99f71f2e2d54b68e56c17d024 (diff) | |
download | stringmetric-a43a304694dbf2b1a02854861cbae2569668d9f8.tar.gz stringmetric-a43a304694dbf2b1a02854861cbae2569668d9f8.tar.bz2 stringmetric-a43a304694dbf2b1a02854861cbae2569668d9f8.zip |
Removed require.
Diffstat (limited to 'core/source')
-rwxr-xr-x | core/source/main/scala/com/rockymadden/stringmetric/tokenize/NGramTokenizer.scala | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/core/source/main/scala/com/rockymadden/stringmetric/tokenize/NGramTokenizer.scala b/core/source/main/scala/com/rockymadden/stringmetric/tokenize/NGramTokenizer.scala index 6769bde..09d2a42 100755 --- a/core/source/main/scala/com/rockymadden/stringmetric/tokenize/NGramTokenizer.scala +++ b/core/source/main/scala/com/rockymadden/stringmetric/tokenize/NGramTokenizer.scala @@ -13,10 +13,7 @@ final case class NGramTokenizer(private val n: Int) extends StringTokenizerLike override def tokenize(a: String): Option[Array[String]] = tokenize(a.toCharArray).map(_.map(_.mkString)) @annotation.tailrec - private[this] def sequence(i: Array[Char], o: Array[Array[Char]], n: Int): Array[Array[Char]] = { - require(n > 0) - + private[this] def sequence(i: Array[Char], o: Array[Array[Char]], n: Int): Array[Array[Char]] = if (i.length <= n) o :+ i else sequence(i.tail, o :+ i.take(n), n) - } } |