From fcdd8047a3cbfd8b537b0d73aa61ede1f1bf5121 Mon Sep 17 00:00:00 2001 From: Steven Troxler Date: Thu, 13 May 2021 11:12:09 -0700 Subject: [PATCH] Add haddock comments to Candidate Summary: When documenting `Types.hs` last week I got confused about what the Bool represented here, following up on a suggestion to add a doc comment Reviewed By: chessai Differential Revision: D28412103 fbshipit-source-id: 01af1f0831fc3e49d4b7f5bb9a4e89c5897b3d25 --- Duckling/Types.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Duckling/Types.hs b/Duckling/Types.hs index 2b62485e..1750326f 100644 --- a/Duckling/Types.hs +++ b/Duckling/Types.hs @@ -252,7 +252,12 @@ instance Ord ResolvedToken where z -> z z -> z -data Candidate = Candidate ResolvedToken Double Bool + +-- |A Candidate represents a potential match going into the ranker +data Candidate = Candidate + ResolvedToken -- ^ The actual resolved token we are considering + Double -- ^ naive Bayes log-likelihood - sum of LL of all rules used + Bool -- ^ Does the ResolvedToken's dimension match the caller's request? deriving (Eq, Show) instance Ord Candidate where