Wrote test code in script.
@ -9,4 +9,12 @@
let SortIntoWordPairs pairSize text =
SplitText @"\s+" text // Splits text where there is a space.
|> Seq.windowed pairSize
let BisectWords words =
let length = Array.length words
let start =
words
|> Seq.take (length - 1)
|> ConcatToString
(start, words.[length - 1])
@ -54,4 +54,7 @@ let dp_words =
let dp_words2 =
let words = "This is a test. And has serveral words in it."
SortIntoWordPairs 4 words
|> Seq.toList
let dp_bisect =
let words = [|"This"; "is"; "a"; "test"; "."; "Contains"; "text"; "."|]
BisectWords words