duckling-0.2.0.0: A Haskell library for parsing text into structured data.
Safe HaskellNone
LanguageHaskell2010

Duckling.Types.Document

Synopsis

Documentation

data Document Source #

Instances

Instances details
Show Document Source # 
Instance details

Defined in Duckling.Types.Document

IsString Document Source # 
Instance details

Defined in Duckling.Types.Document

byteStringFromPos :: Document -> Int -> (ByteString, (Int, Int) -> Text, Int -> Int -> (Int, Int)) Source #

Given a document and an offset (think Text.drop offset), returns a utf8 encoded substring of Document at that offset and 2 translation functions: rangeToText - given a range in the returned ByteString, gives a corresponding subrange of the Document as Text translateRange - given a start and a length of a range in the returned ByteString, gives a corresponding subrange in the Document as pair of (start, end) of Text.drop offsets