Commit 01be6e4a authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FEAT] Lang NLP

parent 5ed03e06
...@@ -310,6 +310,8 @@ addToCorpusWithForm user cid (NewWithForm ft ff d l _n) logStatus jobLog = do ...@@ -310,6 +310,8 @@ addToCorpusWithForm user cid (NewWithForm ft ff d l _n) logStatus jobLog = do
--printDebug "Starting extraction : " cid --printDebug "Starting extraction : " cid
-- TODO granularity of the logStatus -- TODO granularity of the logStatus
printDebug "flowCorpus with lang" l
_cid' <- flowCorpus user _cid' <- flowCorpus user
(Right [cid]) (Right [cid])
(Multi $ fromMaybe EN l) (Multi $ fromMaybe EN l)
......
...@@ -41,7 +41,7 @@ tokens2tokensTags :: [Token] -> [TokenTag] ...@@ -41,7 +41,7 @@ tokens2tokensTags :: [Token] -> [TokenTag]
tokens2tokensTags ts = filter' $ map tokenTag ts tokens2tokensTags ts = filter' $ map tokenTag ts
------------------------------------------------------------------------ ------------------------------------------------------------------------
tokenTag :: Token -> TokenTag tokenTag :: Token -> TokenTag
tokenTag (Token _ _ w l _ _ p n _ _) = TokenTag w' l' p n tokenTag (Token _ w _ l _ _ p n _ _) = TokenTag w' l' p n
where where
w' = split w w' = split w
l' = fromList (split l) l' = fromList (split l)
...@@ -53,7 +53,6 @@ filter' xs = filter isNgrams xs ...@@ -53,7 +53,6 @@ filter' xs = filter isNgrams xs
isNgrams (TokenTag _ _ p n) = isJust p || isJust n isNgrams (TokenTag _ _ p n) = isJust p || isJust n
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- request = -- request =
-- "fr" : { -- "fr" : {
-- "tokenize.language" : "fr", -- "tokenize.language" : "fr",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment