[ngrams] fixes to highlight wordBoundaryChars

parent e11d4005
...@@ -133,7 +133,7 @@ lookupRootListWithChildren ngram table@(NgramsTable {ngrams_repo_elements: elts} ...@@ -133,7 +133,7 @@ lookupRootListWithChildren ngram table@(NgramsTable {ngrams_repo_elements: elts}
Just (NgramsRepoElement {list}) -> Just list -- assert root == Nothing Just (NgramsRepoElement {list}) -> Just list -- assert root == Nothing
wordBoundaryChars :: String wordBoundaryChars :: String
wordBoundaryChars = "[ .,;:!?'\\{}()]" wordBoundaryChars = """[ .,;:!?’'«»"\\/\|{}()\[\]\-_—\+\*=~#@...]"""
wordBoundaryReg :: R.Regex wordBoundaryReg :: R.Regex
wordBoundaryReg = case R.regex ("(" <> wordBoundaryChars <> ")") (R.global <> R.multiline) of wordBoundaryReg = case R.regex ("(" <> wordBoundaryChars <> ")") (R.global <> R.multiline) of
......
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