summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/Main.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/Main.hs b/app/Main.hs
index 156af1d..5eb661d 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -252,8 +252,8 @@ main = do
keep
)
(map (cwd </>) inputs)
- allDocs <- getDocuments
docs <- mapM (readDocument . (<.> "json")) indexNames
+ allDocs <- getDocuments
docs' <-
if prompt
then processDocumentsInteractively settings allDocs docs
@@ -480,7 +480,10 @@ suggestTags settings allDocs doc = do
]
let tagValues =
probabilityMap
- & filter (\(word, tag, _) -> hasWordAndTag word tag doc)
+ & filter
+ ( \(word, tag, _) ->
+ tagKey tag == tagName && hasWord word doc
+ )
& foldl'
( \scorePerTagValue (_, tag, p) ->
M.insertWith