|
|
|
@ -32,21 +32,22 @@ module Search (Json, tokenize, findJsonObjects) where
@@ -32,21 +32,22 @@ module Search (Json, tokenize, findJsonObjects) where
|
|
|
|
|
|
|
|
|
|
-- ----------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
import Relude ( Maybe (Just, Nothing), Bool, Int, String, Text |
|
|
|
|
, otherwise, sortWith, toString, toText, div |
|
|
|
|
, (-), (*), ($), (&), (<$>), (==), (<>), (<), (>), (>=), (&&), (.) ) |
|
|
|
|
import Relude ( Maybe (Just, Nothing), Bool, Int, String, Text |
|
|
|
|
, otherwise, sortWith, toString, toText, div |
|
|
|
|
, (-), (*), (.), (<>), (==), (<), (>), (>=) |
|
|
|
|
, ($), (&), (<$>), (&&) ) |
|
|
|
|
|
|
|
|
|
import Data.Aeson ( FromJSON, ToJSON, toJSON, object, (.=) ) |
|
|
|
|
import Data.Char ( toLower, isAlphaNum ) |
|
|
|
|
import Data.List ( minimum, map, sum, elem, filter, length, nub ) |
|
|
|
|
import GHC.Generics ( Generic ) |
|
|
|
|
import Text.EditDistance ( levenshteinDistance, defaultEditCosts ) |
|
|
|
|
import Data.Aeson ( FromJSON, ToJSON, toJSON, object, (.=) ) |
|
|
|
|
import Data.Char ( toLower, isAlphaNum ) |
|
|
|
|
import Data.List ( minimum, map, sum, elem, filter, length, nub ) |
|
|
|
|
import GHC.Generics ( Generic ) |
|
|
|
|
import Text.EditDistance ( levenshteinDistance, defaultEditCosts ) |
|
|
|
|
|
|
|
|
|
import qualified Data.Text as T ( map, length, take, toLower, strip, words ) |
|
|
|
|
import qualified Network.URI.Encode as URI ( decodeText ) |
|
|
|
|
|
|
|
|
|
import Settings ( maxContentLength, minPatternLength |
|
|
|
|
, outOfScore, fullScore, scoreMultiplier, replaceChar ) |
|
|
|
|
import Settings ( maxContentLength, minPatternLength, replaceChar |
|
|
|
|
, outOfScore, fullScore, scoreMultiplier ) |
|
|
|
|
|
|
|
|
|
-- ----------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|