-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Launches CoreNLP and parses the JSON output @package corenlp-parser @version 0.1.0.0 -- | Module provides a handy wrapper around the CoreNLP project's -- command-line utility -- https://nlp.stanford.edu/software/corenlp.html , and a parser -- for some of its output formats. module NLP.CoreNLP -- | Launch CoreNLP with your inputs. This function will put every piece of -- Text in a separate file, launch CoreNLP subprocess, and parse -- the results launchCoreNLP :: FilePath -> [Text] -> IO [Either String Document] -- | Parse JSON output of CoreNLP. See headlines source for an -- example JSON input. parseJsonDoc :: Text -> Either String Document data Dependency Dependency :: Text -> Int -> Text -> Int -> Text -> Dependency [$sel:dep:Dependency] :: Dependency -> Text [$sel:governor:Dependency] :: Dependency -> Int [$sel:governorGloss:Dependency] :: Dependency -> Text [$sel:dependent:Dependency] :: Dependency -> Int [$sel:dependentGloss:Dependency] :: Dependency -> Text data Entitymention Entitymention :: Int -> Int -> Int -> Int -> Text -> Int -> Int -> Text -> Maybe Text -> Entitymention [$sel:docTokenBegin:Entitymention] :: Entitymention -> Int [$sel:docTokenEnd:Entitymention] :: Entitymention -> Int [$sel:tokenBegin:Entitymention] :: Entitymention -> Int [$sel:tokenEnd:Entitymention] :: Entitymention -> Int [$sel:text:Entitymention] :: Entitymention -> Text [$sel:characterOffsetBegin:Entitymention] :: Entitymention -> Int [$sel:characterOffsetEnd:Entitymention] :: Entitymention -> Int [$sel:ner:Entitymention] :: Entitymention -> Text [$sel:normalizedNER:Entitymention] :: Entitymention -> Maybe Text data Token Token :: Int -> Text -> Text -> Text -> Int -> Int -> Text -> Text -> Text -> Text -> Text -> Token [$sel:index:Token] :: Token -> Int [$sel:word:Token] :: Token -> Text [$sel:originalText:Token] :: Token -> Text [$sel:lemma:Token] :: Token -> Text [$sel:characterOffsetBegin:Token] :: Token -> Int [$sel:characterOffsetEnd:Token] :: Token -> Int [$sel:pos:Token] :: Token -> Text [$sel:ner:Token] :: Token -> Text [$sel:speaker:Token] :: Token -> Text [$sel:before:Token] :: Token -> Text [$sel:after:Token] :: Token -> Text data Sentence Sentence :: Int -> Text -> [Dependency] -> [Dependency] -> [Dependency] -> [Entitymention] -> [Token] -> Sentence [$sel:index:Sentence] :: Sentence -> Int [$sel:parse:Sentence] :: Sentence -> Text [$sel:basicDependencies:Sentence] :: Sentence -> [Dependency] [$sel:enhancedDependencies:Sentence] :: Sentence -> [Dependency] [$sel:enhancedPlusPlusDependencies:Sentence] :: Sentence -> [Dependency] [$sel:entitymentions:Sentence] :: Sentence -> [Entitymention] [$sel:tokens:Sentence] :: Sentence -> [Token] data Coref Coref :: Int -> Text -> Text -> Text -> Text -> Text -> Int -> Int -> Int -> Int -> [Int] -> Bool -> Coref [$sel:id:Coref] :: Coref -> Int [$sel:text:Coref] :: Coref -> Text [$sel:type_:Coref] :: Coref -> Text [$sel:number:Coref] :: Coref -> Text [$sel:gender:Coref] :: Coref -> Text [$sel:animacy:Coref] :: Coref -> Text [$sel:startIndex:Coref] :: Coref -> Int [$sel:endIndex:Coref] :: Coref -> Int [$sel:headIndex:Coref] :: Coref -> Int [$sel:sentNum:Coref] :: Coref -> Int [$sel:position:Coref] :: Coref -> [Int] [$sel:isRepresentativeMention:Coref] :: Coref -> Bool type CorefsId = Text type Corefs = HashMap CorefsId [Coref] data Document Document :: Text -> [Sentence] -> Corefs -> Document [$sel:docId:Document] :: Document -> Text [$sel:sentences:Document] :: Document -> [Sentence] [$sel:corefs:Document] :: Document -> Corefs test :: IO () instance GHC.Generics.Generic NLP.CoreNLP.Document instance GHC.Classes.Eq NLP.CoreNLP.Document instance GHC.Show.Show NLP.CoreNLP.Document instance GHC.Generics.Generic NLP.CoreNLP.Coref instance GHC.Classes.Eq NLP.CoreNLP.Coref instance GHC.Show.Show NLP.CoreNLP.Coref instance GHC.Generics.Generic NLP.CoreNLP.Sentence instance GHC.Classes.Eq NLP.CoreNLP.Sentence instance GHC.Show.Show NLP.CoreNLP.Sentence instance GHC.Generics.Generic NLP.CoreNLP.Token instance GHC.Classes.Eq NLP.CoreNLP.Token instance GHC.Show.Show NLP.CoreNLP.Token instance GHC.Generics.Generic NLP.CoreNLP.Entitymention instance GHC.Classes.Eq NLP.CoreNLP.Entitymention instance GHC.Show.Show NLP.CoreNLP.Entitymention instance GHC.Generics.Generic NLP.CoreNLP.Dependency instance GHC.Classes.Eq NLP.CoreNLP.Dependency instance GHC.Show.Show NLP.CoreNLP.Dependency instance Data.Aeson.Types.FromJSON.FromJSON NLP.CoreNLP.Document instance Data.Aeson.Types.ToJSON.ToJSON NLP.CoreNLP.Document instance Data.Aeson.Types.FromJSON.FromJSON NLP.CoreNLP.Coref instance Data.Aeson.Types.ToJSON.ToJSON NLP.CoreNLP.Coref instance Data.Aeson.Types.FromJSON.FromJSON NLP.CoreNLP.Sentence instance Data.Aeson.Types.ToJSON.ToJSON NLP.CoreNLP.Sentence instance Data.Aeson.Types.FromJSON.FromJSON NLP.CoreNLP.Token instance Data.Aeson.Types.ToJSON.ToJSON NLP.CoreNLP.Token instance Data.Aeson.Types.FromJSON.FromJSON NLP.CoreNLP.Entitymention instance Data.Aeson.Types.ToJSON.ToJSON NLP.CoreNLP.Entitymention instance Data.Aeson.Types.FromJSON.FromJSON NLP.CoreNLP.Dependency instance Data.Aeson.Types.ToJSON.ToJSON NLP.CoreNLP.Dependency