Browse Source

Wrote test scripts which generates data upto data structuring section.

This is a "clean" version with the intention of moving over to the main fs files.
master
Craig Oates 6 years ago
parent
commit
0d0ef37da2
  1. 3
      WetPancake/DataServices.fs
  2. 2
      WetPancake/DataStructuring.fs
  3. 17
      WetPancake/Script.fsx

3
WetPancake/DataServices.fs

@ -1,2 +1 @@
module internal DataServices
module internal DataServices

2
WetPancake/DataStructuring.fs

@ -14,7 +14,7 @@
BisectWords text ||> UpdateMap map
let SeperateStartWords map =
let startWords, otherWords =
let startWords =
map
|> Map.partition (fun k _ -> MatchText @"^[A-Z]" k)
startWords

17
WetPancake/Script.fsx

@ -15,6 +15,7 @@ open DataAccess
open DataCleaning
open DataProcessing
open DataStructuring
open System.Reflection
// System Services
let ss_number = PickRandomNumber 10
@ -101,4 +102,18 @@ let ds_map7 =
let result =
[for item in ds_map5 -> SeperateStartWords item]
result
let ds_map7Item = ds_map7.Item(0)
let ds_map7Item = ds_map7.Item(0)
// Data Services
let dss_text =
LoadFile SelectRandomSampleFile
|> ReplaceArtifact "\""
|> ReplaceArtifact "\n\nIn"
|> ReplaceArtifact "\r"
|> ReplaceArtifact "\n"
|> SplitText @"\s+"
|> ConcatToString
|> SortIntoPairs 6
|> Seq.toList
let dss_map = [for item in dss_text -> ConstructMap Map.empty item]
let dss_startwords = [for item in dss_map -> SeperateStartWords item]

Loading…
Cancel
Save