Browse Source

Created RemoveArtifactSentences function.

master
Craig Oates 6 years ago
parent
commit
3a51ee9dc3
  1. 7
      WetPancake/DataServices.fs

7
WetPancake/DataServices.fs

@ -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)

Loading…
Cancel
Save