Browse Source

Check-in before work.

Writing the seperate start words functionality.
master
Craig Oates 6 years ago
parent
commit
05815b3589
  1. 10
      WetPancake/DataStructuring.fs
  2. 8
      WetPancake/Script.fsx

10
WetPancake/DataStructuring.fs

@ -10,5 +10,11 @@
else
map.Add (key, [value])
let InitialiseMap map text =
BisectWords text ||> UpdateMap map
let ConstructMap map text =
BisectWords text ||> UpdateMap map
let SeperateStartWords map =
let startWords, otherWords =
map
|> Map.partition (fun k _ -> MatchText @"^[A-Z]" k)
startWords

8
WetPancake/Script.fsx

@ -79,8 +79,10 @@ let dp_combine4 =
// Data Structuring
let ds_map = Map.empty
let ds_text = [|"This"; "is"; "a"; "test"; "string."|]
let ds_map2 = InitialiseMap ds_map ds_text
let ds_map3 =
let ds_map2 =
let text = BisectWords ds_text
let result = UpdateMap ds_map (fst(text)) (snd(text))
result
result
let ds_map3 = ConstructMap ds_map ds_text
let ds_start = SeperateStartWords ds_map3
// YOU ARE UP TO HERE. YOU NEED TO BUILD A BIGGER MAP TO TEST THE START WORD CODE.
Loading…
Cancel
Save