From ab062622913d9d5cd7447cdec71d24021ceca84a Mon Sep 17 00:00:00 2001 From: Julien Odent Date: Fri, 10 Mar 2017 11:40:47 -0800 Subject: [PATCH] Strip off TODO/FIXME Summary: as the title says Differential Revision: D4682120 fbshipit-source-id: 3f66286 --- Duckling/Dimensions/Types.hs | 1 - Duckling/Duration/EN/Rules.hs | 1 - Duckling/Duration/FR/Rules.hs | 1 - Duckling/Engine.hs | 2 -- Duckling/Rules.hs | 1 - Duckling/Time/EN/Rules.hs | 5 ----- Duckling/Time/Helpers.hs | 3 --- 7 files changed, 14 deletions(-) diff --git a/Duckling/Dimensions/Types.hs b/Duckling/Dimensions/Types.hs index 82cc25c1..465f9108 100644 --- a/Duckling/Dimensions/Types.hs +++ b/Duckling/Dimensions/Types.hs @@ -46,7 +46,6 @@ import Duckling.Volume.Types (VolumeData) -- ----------------------------------------------------------------- -- Wrapper to house the existential --- TODO: get rid of this t14593551 data Some t = forall a . Some (t a) -- ----------------------------------------------------------------- diff --git a/Duckling/Duration/EN/Rules.hs b/Duckling/Duration/EN/Rules.hs index ac955770..e57d7294 100644 --- a/Duckling/Duration/EN/Rules.hs +++ b/Duckling/Duration/EN/Rules.hs @@ -126,7 +126,6 @@ ruleDurationA = Rule _ -> Nothing } --- TODO(jodent) precision t13807342 ruleDurationPrecision :: Rule ruleDurationPrecision = Rule { name = "about|exactly " diff --git a/Duckling/Duration/FR/Rules.hs b/Duckling/Duration/FR/Rules.hs index fe8a889d..31d9aace 100644 --- a/Duckling/Duration/FR/Rules.hs +++ b/Duckling/Duration/FR/Rules.hs @@ -81,7 +81,6 @@ ruleTroisQuartsDHeure = Rule , prod = \_ -> Just . Token Duration $ duration TG.Minute 45 } --- TODO(jodent) precision t13807342 ruleDurationEnviron :: Rule ruleDurationEnviron = Rule { name = "environ " diff --git a/Duckling/Engine.hs b/Duckling/Engine.hs index 0b7da93a..41ba1697 100644 --- a/Duckling/Engine.hs +++ b/Duckling/Engine.hs @@ -89,7 +89,6 @@ isRangeValid s (Range start end) = isDifferent :: Char -> Char -> Bool isDifferent a b = charClass a /= charClass b --- TODO(jodent) use Attoparsec t12879001 lookupRegex :: PCRE.Regex -> Int -> Text -> [Node] lookupRegex regex position s = nodes where @@ -152,7 +151,6 @@ matchFirst sentence stash (rule@(Rule {pattern = p:ps}), position, route) = -- | Finds new matches resulting from newly added tokens. -- Produces new tokens from full matches. --- TODO(jodent) partially order matches and find longest whitespace sequence parseString1 :: [Rule] -> Text -> Stash -> Stash -> [Match] -> (Stash, [Match]) parseString1 rules sentence stash new matches = -- Produce full matches as new tokens diff --git a/Duckling/Rules.hs b/Duckling/Rules.hs index 4dc60ea5..2d2ceb0f 100644 --- a/Duckling/Rules.hs +++ b/Duckling/Rules.hs @@ -56,7 +56,6 @@ rulesFor lang targets -- | Returns all the rules for `lang`. -- We can't really use `allDimensions` as-is, since `TimeGrain` is not present. --- TODO(jodent) t15599019 allRules :: Lang -> [Rule] allRules lang = concatMap (rulesFor' lang) . HashSet.toList . explicitDimensions . HashSet.fromList $ allDimensions lang diff --git a/Duckling/Time/EN/Rules.hs b/Duckling/Time/EN/Rules.hs index 46043afd..caf45f0e 100644 --- a/Duckling/Time/EN/Rules.hs +++ b/Duckling/Time/EN/Rules.hs @@ -45,7 +45,6 @@ ruleIntersect = Rule _ -> Nothing } --- TODO(jodent) solve this in intersect (t14842790) ruleIntersect2 :: Rule ruleIntersect2 = Rule { name = "intersect2" @@ -302,7 +301,6 @@ ruleYear = Rule _ -> Nothing } --- FIXME (jodent) "8 tonight" intersection is not empty (2008-1-1) t14087284 ruleYearPastLatent :: Rule ruleYearPastLatent = Rule { name = "past year (latent)" @@ -873,7 +871,6 @@ ruleSeasons = Rule } --- TODO(jodent) precision t13807342 ruleTODPrecision :: Rule ruleTODPrecision = Rule { name = " sharp|exactly" @@ -1088,7 +1085,6 @@ ruleIntervalAfterTOD = Rule _ -> Nothing } --- TODO(jodent) merge with previous rule ruleIntervalSinceTOD :: Rule ruleIntervalSinceTOD = Rule { name = "since " @@ -1203,7 +1199,6 @@ ruleMoreUSHolidays = map go moreUSHolidays , prod = \_ -> Just . Token Time $ nthDOWOfMonth n dow m } --- TODO(jodent) nthDOWOfMonth (-1) 1 5 -- Last Monday of May ruleMemorialDay :: Rule ruleMemorialDay = Rule diff --git a/Duckling/Time/Helpers.hs b/Duckling/Time/Helpers.hs index 3b4cd1ec..eaecc037 100644 --- a/Duckling/Time/Helpers.hs +++ b/Duckling/Time/Helpers.hs @@ -130,7 +130,6 @@ takeN n notImmediate f = mkSeriesPredicate series _ -> Nothing _ -> Nothing --- TODO(jodent) use `timeSeqMap` -- | -1 is the first element in the past -- | 0 is the first element in the future takeNth :: Int -> Bool -> TTime.Predicate -> TTime.Predicate @@ -186,7 +185,6 @@ takeLastOf cyclicPred basePred = timeSeqMap False f basePred timeCompose :: TTime.Predicate -> TTime.Predicate -> TTime.Predicate timeCompose pred1 pred2 = mkIntersectPredicate pred1 pred2 --- TODO(jodent) looks like dontReverse is redundant (check with :values) -- | Applies `f` to each interval yielded by `g`. -- | Intervals including "now" are in the future. timeSeqMap @@ -344,7 +342,6 @@ isDOMValue = liftM2 (||) isDOMOrdinal isDOMInteger -- Production -- Pass the interval second --- FIXME(jodent) check on explicit end and allow any order intersect :: (TimeData, TimeData) -> TimeData intersect (TimeData pred1 _ g1 _ _ d1, TimeData pred2 _ g2 _ _ d2) | g1 < g2 = TTime.timedata'