|
|
|
@ -12,6 +12,11 @@
|
|
|
|
|
ListSampleFiles |
|
|
|
|
|> Array.contains filePath |
|
|
|
|
|
|
|
|
|
let RemoveArtifactSentences text noOfSentences = |
|
|
|
|
text |
|
|
|
|
|> SplitText "(\.|\?|\!)$" |
|
|
|
|
|> Array.take noOfSentences |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let rec GenerateMarkovChain (map: Map<string, string List>) (state:string) chain = |
|
|
|
|
if map.ContainsKey state then |
|
|
|
@ -20,7 +25,7 @@
|
|
|
|
|
else |
|
|
|
|
let currentWords = |
|
|
|
|
state |
|
|
|
|
|> SplitText @"\s+" |
|
|
|
|
|> SplitText "\s+" |
|
|
|
|
|> Seq.skip 1 |
|
|
|
|
|> ConcatToString |
|
|
|
|
GenerateMarkovChain map (CombineWords currentWords nextChoice) (nextChoice :: chain) |
|
|
|
|