@@ -12,7 +12,7 @@ import qualified Data.ByteString.Lazy.Char8 as LB
12
12
import qualified Data.Map.Strict as SM
13
13
14
14
import Utils.Drasil (invert , atLeast2 )
15
- import Database.Drasil (traceTable , refbyTable )
15
+ import Database.Drasil (traceTable , refbyTable , ChunkDB ( termTable ) )
16
16
import Control.Lens ((^.) )
17
17
import System.Environment (lookupEnv )
18
18
@@ -39,12 +39,14 @@ dumpEverything0 si pinfo targetPath = do
39
39
let chunkDb = si ^. sysinfodb
40
40
chunkDump = DB. dumpChunkDB chunkDb
41
41
invertedChunkDump = invert chunkDump
42
- sharedUIDs = SM. filter atLeast2 invertedChunkDump
42
+ ( sharedUIDs, nonsharedUIDs) = SM. partition atLeast2 invertedChunkDump
43
43
traceDump = chunkDb ^. traceTable
44
44
refByDump = chunkDb ^. refbyTable
45
+ justTerms = SM. intersection nonsharedUIDs $ termTable chunkDb
45
46
46
47
dumpTo chunkDump $ targetPath ++ " seeds.json"
47
48
dumpTo invertedChunkDump $ targetPath ++ " inverted_seeds.json"
49
+ dumpTo justTerms $ targetPath ++ " uids_are_just_terms.json"
48
50
dumpTo sharedUIDs $ targetPath ++ " problematic_seeds.json"
49
51
dumpTo traceDump $ targetPath ++ " trace.json"
50
52
dumpTo refByDump $ targetPath ++ " reverse_trace.json"
0 commit comments