Package Exports
- functional-types
- functional-types/lib/FileType
- functional-types/lib/Folder
- functional-types/lib/Response
- functional-types/lib/Schema
- functional-types/lib/Serialize
- functional-types/lib/Serialize/Schema
- functional-types/lib/TableAnnotation
- functional-types/lib/fp-ts/TaskEither
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (functional-types) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
functional-types
functional-types
Index
Modules
- "Comparable"
- "DateTime"
- "DocumentAnnotation"
- "Excel"
- "FileType"
- "Folder/Arbitraries"
- "Folder/index"
- "Json"
- "Label"
- "Response"
- "Schema"
- "Serialize/Arbitraries"
- "Serialize/Schema"
- "Serialize/index"
- "String"
- "TableAnnotation"
- "TextAnnotation"
- "Types"
- "Vertex/Arbitraries"
- "Vertex/index"
- "Vision"
- "fp-ts/ReaderIO"
- "fp-ts/TaskEither"
Interfaces
functional-types › "Comparable" › Comparable
Interface: Comparable
Hierarchy
- Comparable
Index
Properties
Properties
attributes
• attributes: Tree
Defined in src/Comparable.ts:98
created_at
• created_at: string
Defined in src/Comparable.ts:99
files
• files: string[]
Defined in src/Comparable.ts:97
id
• id: string
Defined in src/Comparable.ts:95
schema_id
• schema_id: string
Defined in src/Comparable.ts:96
updated_at
• updated_at: string
Defined in src/Comparable.ts:100
functional-types › "Comparable" › ComparableView
Interface: ComparableView
Hierarchy
object
↳ ComparableView
Index
Properties
Properties
attributes
• attributes: TreeView
Defined in src/Comparable.ts:106
functional-types › "Comparable" › FromLeafOptions
Interface: FromLeafOptions
Hierarchy
-
↳ FromLeafOptions
Index
Properties
Properties
Optional
key
• key? : Predicate
Inherited from FromTableOptions.key
Defined in src/Comparable.ts:116
Optional
mergeKey
• mergeKey? : boolean
Inherited from FromTableOptions.mergeKey
Defined in src/Comparable.ts:117
predicate
• predicate: Predicate
Defined in src/Comparable.ts:122
splitBy
• splitBy: Direction
Inherited from FromTableOptions.splitBy
Defined in src/Comparable.ts:118
functional-types › "Comparable" › FromTableOptions
Interface: FromTableOptions
Hierarchy
FromTableOptions
Index
Properties
Properties
Optional
key
• key? : Predicate
Defined in src/Comparable.ts:116
Optional
mergeKey
• mergeKey? : boolean
Defined in src/Comparable.ts:117
splitBy
• splitBy: Direction
Defined in src/Comparable.ts:118
functional-types › "Comparable" › Leaf
Interface: Leaf
Hierarchy
- Leaf
Index
Properties
Properties
Optional
metadata
• metadata? : Metadata
Defined in src/Comparable.ts:83
value
• value: string
Defined in src/Comparable.ts:82
functional-types › "Comparable" › Metadata
Interface: Metadata
Hierarchy
- Metadata
Index
Properties
Properties
Optional
bounding_poly
• bounding_poly? : Poly
Defined in src/Comparable.ts:78
functional-types › "Comparable" › Partitions
Interface: Partitions
Hierarchy
- Partitions
Index
Properties
Properties
branchByLabel
• branchByLabel: Dictionary‹Branch›
Defined in src/Comparable.ts:110
cellByLabel
• cellByLabel: Dictionary‹D.CellByName›
Defined in src/Comparable.ts:112
tableByLabel
• tableByLabel: Dictionary‹D.TableByName›
Defined in src/Comparable.ts:111
functional-types › "Comparable" › Tree
Interface: Tree
Hierarchy
- Tree
Indexable
- [ index: string]: Node
functional-types › "DocumentAnnotation" › Branch
Interface: Branch
Hierarchy
-
↳ Branch
Index
Properties
Properties
boundingPoly
• boundingPoly: Poly
Inherited from Node.boundingPoly
Defined in src/DocumentAnnotation.ts:73
children
• children: Tree[]
Defined in src/DocumentAnnotation.ts:107
id
• id: string
Defined in src/DocumentAnnotation.ts:71
label
• label: string
Defined in src/DocumentAnnotation.ts:72
Optional
parent
• parent? : Branch
Defined in src/DocumentAnnotation.ts:106
functional-types › "DocumentAnnotation" › Cell
Interface: Cell
Hierarchy
Index
Properties
Properties
boundingPoly
• boundingPoly: Poly
Inherited from Node.boundingPoly
Defined in src/DocumentAnnotation.ts:73
id
• id: string
Defined in src/DocumentAnnotation.ts:71
label
• label: string
Defined in src/DocumentAnnotation.ts:72
text
• text: string
Defined in src/DocumentAnnotation.ts:78
words
• words: Word[]
Defined in src/DocumentAnnotation.ts:77
functional-types › "DocumentAnnotation" › Descendant
Interface: Descendant
Hierarchy
↳ Branch
↳ Descendant
Index
Properties
Properties
boundingPoly
• boundingPoly: Poly
Inherited from Node.boundingPoly
Defined in src/DocumentAnnotation.ts:73
children
• children: Leaf[]
Defined in src/DocumentAnnotation.ts:111
id
• id: string
Defined in src/DocumentAnnotation.ts:71
label
• label: string
Defined in src/DocumentAnnotation.ts:72
Optional
parent
• parent? : Branch
Defined in src/DocumentAnnotation.ts:106
functional-types › "DocumentAnnotation" › DocumentAnnotation
Interface: DocumentAnnotation
Hierarchy
- DocumentAnnotation
Index
Properties
Properties
created_at
• created_at: string
Defined in src/DocumentAnnotation.ts:126
file
• file: string
Defined in src/DocumentAnnotation.ts:124
forestByPage
• forestByPage: ForestByPage
Defined in src/DocumentAnnotation.ts:125
id
• id: string
Defined in src/DocumentAnnotation.ts:123
updated_at
• updated_at: string
Defined in src/DocumentAnnotation.ts:127
functional-types › "DocumentAnnotation" › Node
Interface: Node
Hierarchy
Index
Properties
Properties
boundingPoly
• boundingPoly: Poly
Defined in src/DocumentAnnotation.ts:73
id
• id: string
Defined in src/DocumentAnnotation.ts:71
label
• label: string
Defined in src/DocumentAnnotation.ts:72
functional-types › "DocumentAnnotation" › Table
Interface: Table
Hierarchy
-
↳ Table
Index
Properties
- boundingPoly
- cellById
- columnHeaders
- id
- intersectHeader
- label
- mergedColumnHeader
- mergedRowHeader
- rowHeaders
Properties
boundingPoly
• boundingPoly: Poly
Inherited from Node.boundingPoly
Defined in src/DocumentAnnotation.ts:73
cellById
• cellById: TableCellById
Defined in src/DocumentAnnotation.ts:96
columnHeaders
• columnHeaders: Cell[]
Defined in src/DocumentAnnotation.ts:92
id
• id: string
Defined in src/DocumentAnnotation.ts:71
intersectHeader
• intersectHeader: Cell
Defined in src/DocumentAnnotation.ts:93
label
• label: string
Defined in src/DocumentAnnotation.ts:72
mergedColumnHeader
• mergedColumnHeader: Cell
Defined in src/DocumentAnnotation.ts:95
mergedRowHeader
• mergedRowHeader: Cell
Defined in src/DocumentAnnotation.ts:94
rowHeaders
• rowHeaders: Cell[]
Defined in src/DocumentAnnotation.ts:91
functional-types › "DocumentAnnotation" › TableCell
Interface: TableCell
Hierarchy
↳ Cell
↳ TableCell
Index
Properties
Properties
boundingPoly
• boundingPoly: Poly
Inherited from Node.boundingPoly
Defined in src/DocumentAnnotation.ts:73
columnHeader
• columnHeader: Cell
Defined in src/DocumentAnnotation.ts:85
id
• id: string
Defined in src/DocumentAnnotation.ts:71
label
• label: string
Defined in src/DocumentAnnotation.ts:72
rowHeader
• rowHeader: Cell
Defined in src/DocumentAnnotation.ts:84
text
• text: string
Defined in src/DocumentAnnotation.ts:78
words
• words: Word[]
Defined in src/DocumentAnnotation.ts:77
functional-types › "Folder/index" › Attributes
Interface: Attributes
Hierarchy
- Attributes
Index
Properties
Properties
folder
• folder: string
Defined in src/Folder/index.ts:30
id
• id: string
Defined in src/Folder/index.ts:29
name
• name: string
Defined in src/Folder/index.ts:31
type
• type: FT.FileType
Defined in src/Folder/index.ts:32
functional-types › "Folder/index" › Folder
Interface: Folder
Hierarchy
- Folder
Index
Properties
Properties
created_at
• created_at: string
Defined in src/Folder/index.ts:24
id
• id: string
Defined in src/Folder/index.ts:22
name
• name: string
Defined in src/Folder/index.ts:23
updated_at
• updated_at: string
Defined in src/Folder/index.ts:25
functional-types › "Folder/index" › FolderReference
Interface: FolderReference
Hierarchy
- FolderReference
Index
Properties
Properties
folder
• folder: string
Defined in src/Folder/index.ts:54
functional-types › "Folder/index" › Metadata
Interface: Metadata
Hierarchy
- Metadata
Index
Properties
Properties
bucket
• bucket: string
Defined in src/Folder/index.ts:41
content_type
• content_type: string
Defined in src/Folder/index.ts:43
created_at
• created_at: string
Defined in src/Folder/index.ts:45
generation
• generation: string
Defined in src/Folder/index.ts:42
id
• id: string
Defined in src/Folder/index.ts:37
kind
• kind: string
Defined in src/Folder/index.ts:36
media_link
• media_link: string
Defined in src/Folder/index.ts:39
name
• name: string
Defined in src/Folder/index.ts:40
self_link
• self_link: string
Defined in src/Folder/index.ts:38
size
• size: string
Defined in src/Folder/index.ts:44
updated_at
• updated_at: string
Defined in src/Folder/index.ts:46
functional-types › "Folder/index" › Reference
Interface: Reference
Hierarchy
- Reference
Index
Properties
Properties
file
• file: string
Defined in src/Folder/index.ts:50
functional-types › "Label" › Label
Interface: Label
Hierarchy
- Label
Index
Properties
Properties
color
• color: string
Defined in src/Label.ts:6
id
• id: string
Defined in src/Label.ts:4
name
• name: string
Defined in src/Label.ts:5
functional-types › "Response" › Failure
Interface: Failure
Hierarchy
- Failure
Index
Properties
Properties
error
• error: string
Defined in src/Response.ts:25
functional-types › "Response" › Success
Interface: Success <**T**>
Type parameters
▪ T
Hierarchy
- Success
Index
Properties
Properties
message
• message: string
Defined in src/Response.ts:20
payload
• payload: T
Defined in src/Response.ts:21
functional-types › "Schema" › Gettable
Interface: Gettable
Hierarchy
- Gettable
Index
Properties
Properties
attribute
• attribute: Path
Defined in src/Schema.ts:67
file
• file: FilePath
Defined in src/Schema.ts:66
Optional
options
• options? : GettableOptions
Defined in src/Schema.ts:68
functional-types › "Schema" › GettableOptions
Interface: GettableOptions
Hierarchy
- GettableOptions
Index
Properties
Properties
Optional
direction
• direction? : Direction
Defined in src/Schema.ts:59
Optional
key
• key? : RegExp
Defined in src/Schema.ts:60
Optional
merge_type
• merge_type? : MergeType[]
Defined in src/Schema.ts:58
Optional
replacements
• replacements? : Replacements
Defined in src/Schema.ts:61
Optional
unnest
• unnest? : number
Defined in src/Schema.ts:62
functional-types › "Schema" › Predicate
Interface: Predicate
Hierarchy
- Predicate
Index
Properties
Properties
Optional
properties
• properties? : Property[]
Defined in src/Schema.ts:46
value
• value: RegExp
Defined in src/Schema.ts:45
functional-types › "Schema" › Property
Interface: Property
Hierarchy
- Property
Index
Properties
Properties
pattern
• pattern: RegExp
Defined in src/Schema.ts:41
property
• property: string
Defined in src/Schema.ts:40
functional-types › "Schema" › Replacement
Interface: Replacement
Hierarchy
- Replacement
Index
Properties
Properties
pattern
• pattern: RegExp
Defined in src/Schema.ts:30
value
• value: string
Defined in src/Schema.ts:31
functional-types › "Schema" › Replacements
Interface: Replacements
Hierarchy
- Replacements
Index
Properties
Properties
Optional
keys
• keys? : Replacement[]
Defined in src/Schema.ts:35
Optional
values
• values? : Replacement[]
Defined in src/Schema.ts:36
functional-types › "Schema" › Schema
Interface: Schema
Hierarchy
- Schema
Index
Properties
Properties
created_at
• created_at: string
Defined in src/Schema.ts:79
file_type
• file_type: DocumentType
Defined in src/Schema.ts:78
files
• files: FilePath[]
Defined in src/Schema.ts:77
gettables
• gettables: Gettables
Defined in src/Schema.ts:76
id
• id: string
Defined in src/Schema.ts:74
name
• name: string
Defined in src/Schema.ts:75
updated_at
• updated_at: string
Defined in src/Schema.ts:80
functional-types › "Serialize/Schema" › Gettable
Interface: Gettable
Hierarchy
- Gettable
Index
Properties
Properties
attribute
• attribute: Path
Defined in src/Serialize/Schema.ts:63
file
• file: FilePath
Defined in src/Serialize/Schema.ts:62
Optional
options
• options? : GettableOptions
Defined in src/Serialize/Schema.ts:64
functional-types › "Serialize/Schema" › GettableOptions
Interface: GettableOptions
Hierarchy
- GettableOptions
Index
Properties
Properties
Optional
direction
• direction? : Direction
Defined in src/Serialize/Schema.ts:55
Optional
key
• key? : string
Defined in src/Serialize/Schema.ts:56
Optional
merge_type
• merge_type? : MergeType[]
Defined in src/Serialize/Schema.ts:54
Optional
replacements
• replacements? : Replacements
Defined in src/Serialize/Schema.ts:57
Optional
unnest
• unnest? : number
Defined in src/Serialize/Schema.ts:58
functional-types › "Serialize/Schema" › Predicate
Interface: Predicate
Hierarchy
- Predicate
Index
Properties
Properties
Optional
properties
• properties? : Property[]
Defined in src/Serialize/Schema.ts:44
value
• value: string
Defined in src/Serialize/Schema.ts:43
functional-types › "Serialize/Schema" › Property
Interface: Property
Hierarchy
- Property
Index
Properties
Properties
pattern
• pattern: string
Defined in src/Serialize/Schema.ts:39
property
• property: string
Defined in src/Serialize/Schema.ts:38
functional-types › "Serialize/Schema" › Replacement
Interface: Replacement
Hierarchy
- Replacement
Index
Properties
Properties
pattern
• pattern: string
Defined in src/Serialize/Schema.ts:28
value
• value: string
Defined in src/Serialize/Schema.ts:29
functional-types › "Serialize/Schema" › Replacements
Interface: Replacements
Hierarchy
- Replacements
Index
Properties
Properties
Optional
keys
• keys? : Replacement[]
Defined in src/Serialize/Schema.ts:33
Optional
values
• values? : Replacement[]
Defined in src/Serialize/Schema.ts:34
functional-types › "Serialize/Schema" › Schema
Interface: Schema
Hierarchy
- Schema
Index
Properties
Properties
created_at
• created_at: string
Defined in src/Serialize/Schema.ts:75
file_type
• file_type: DocumentType
Defined in src/Serialize/Schema.ts:74
files
• files: FilePath[]
Defined in src/Serialize/Schema.ts:73
gettables
• gettables: Gettables
Defined in src/Serialize/Schema.ts:72
id
• id: string
Defined in src/Serialize/Schema.ts:70
name
• name: string
Defined in src/Serialize/Schema.ts:71
updated_at
• updated_at: string
Defined in src/Serialize/Schema.ts:76
functional-types › "TableAnnotation" › TableAnnotation
Interface: TableAnnotation
Hierarchy
- TableAnnotation
Index
Properties
Properties
boundingBoxesByPage
• boundingBoxesByPage: BoundingBoxesByPage
Defined in src/TableAnnotation.ts:27
created_at
• created_at: string
Defined in src/TableAnnotation.ts:28
file
• file: string
Defined in src/TableAnnotation.ts:26
id
• id: string
Defined in src/TableAnnotation.ts:25
updated_at
• updated_at: string
Defined in src/TableAnnotation.ts:29
functional-types › "TextAnnotation" › Page
Interface: Page
Hierarchy
- Page
Index
Properties
Properties
paragraphsById
• paragraphsById: ParagraphsById
Defined in src/TextAnnotation.ts:71
wordsById
• wordsById: WordsById
Defined in src/TextAnnotation.ts:70
functional-types › "TextAnnotation" › Paragraph
Interface: Paragraph
Hierarchy
- Paragraph
Index
Properties
Properties
boundingPoly
• boundingPoly: Poly
Defined in src/TextAnnotation.ts:61
confidence
• confidence: number
Defined in src/TextAnnotation.ts:62
id
• id: string
Defined in src/TextAnnotation.ts:60
functional-types › "TextAnnotation" › TextAnnotation
Interface: TextAnnotation
Hierarchy
- TextAnnotation
Index
Properties
Properties
created_at
• created_at: string
Defined in src/TextAnnotation.ts:78
file
• file: string
Defined in src/TextAnnotation.ts:76
id
• id: string
Defined in src/TextAnnotation.ts:75
pages
• pages: Page[]
Defined in src/TextAnnotation.ts:77
updated_at
• updated_at: string
Defined in src/TextAnnotation.ts:79
functional-types › "TextAnnotation" › Word
Interface: Word
Hierarchy
- Word
Index
Properties
Properties
boundingPoly
• boundingPoly: Poly
Defined in src/TextAnnotation.ts:54
breakType
• breakType: BreakType
Defined in src/TextAnnotation.ts:53
confidence
• confidence: number
Defined in src/TextAnnotation.ts:56
id
• id: string
Defined in src/TextAnnotation.ts:51
paragraph
• paragraph: string
Defined in src/TextAnnotation.ts:52
text
• text: string
Defined in src/TextAnnotation.ts:55
functional-types › "Vertex/index" › BoundingBox
Interface: BoundingBox
Hierarchy
BoundingBox
Index
Properties
Properties
boundingPoly
• boundingPoly: Poly
Defined in src/Vertex/index.ts:58
columns
• columns: Line[]
Defined in src/Vertex/index.ts:60
rows
• rows: Line[]
Defined in src/Vertex/index.ts:59
functional-types › "Vertex/index" › Corners
Interface: Corners
Hierarchy
- Corners
Index
Properties
Properties
end
• end: Vertex
Defined in src/Vertex/index.ts:93
start
• start: Vertex
Defined in src/Vertex/index.ts:92
functional-types › "Vertex/index" › LabeledBoundingBox
Interface: LabeledBoundingBox
Hierarchy
-
↳ LabeledBoundingBox
Index
Properties
Properties
boundingPoly
• boundingPoly: Poly
Inherited from BoundingBox.boundingPoly
Defined in src/Vertex/index.ts:58
columns
• columns: Line[]
Inherited from BoundingBox.columns
Defined in src/Vertex/index.ts:60
id
• id: string
Defined in src/Vertex/index.ts:87
label
• label: string
Defined in src/Vertex/index.ts:88
rows
• rows: Line[]
Inherited from BoundingBox.rows
Defined in src/Vertex/index.ts:59
functional-types › "Vertex/index" › Rectangle
Interface: Rectangle
Hierarchy
- Rectangle
Index
Properties
Properties
x0
• x0: number
Defined in src/Vertex/index.ts:97
x1
• x1: number
Defined in src/Vertex/index.ts:99
y0
• y0: number
Defined in src/Vertex/index.ts:98
y1
• y1: number
Defined in src/Vertex/index.ts:100
functional-types › "Vertex/index" › Vertex
Interface: Vertex
Hierarchy
- Vertex
Index
Properties
Properties
x
• x: number
Defined in src/Vertex/index.ts:46
y
• y: number
Defined in src/Vertex/index.ts:47
functional-types › "Vision" › AnnotateImageRequest
Interface: AnnotateImageRequest
Hierarchy
- AnnotateImageRequest
Index
Properties
Properties
Optional
features
• features? : Feature[]
Defined in src/Vision.ts:48
image
• image: Image
Defined in src/Vision.ts:47
Optional
imageContext
• imageContext? : ImageContext
Defined in src/Vision.ts:49
functional-types › "Vision" › AnnotateImageResponse
Interface: AnnotateImageResponse
Hierarchy
- AnnotateImageResponse
Index
Properties
Properties
Optional
fullTextAnnotation
• fullTextAnnotation? : TextAnnotation
Defined in src/Vision.ts:63
Optional
labelAnnotations
• labelAnnotations? : EntityAnnotation[]
Defined in src/Vision.ts:54
Optional
textAnnotations
• textAnnotations? : EntityAnnotation[]
Defined in src/Vision.ts:57
functional-types › "Vision" › AsyncAnnotateFileRequest
Interface: AsyncAnnotateFileRequest
Hierarchy
- AsyncAnnotateFileRequest
Index
Properties
Properties
features
• features: Feature[]
Defined in src/Vision.ts:16
Optional
imageContext
• imageContext? : ImageContext
Defined in src/Vision.ts:17
inputConfig
• inputConfig: InputConfig
Defined in src/Vision.ts:15
outputConfig
• outputConfig: OutputConfig
Defined in src/Vision.ts:18
Optional
responses
• responses? : AnnotateImageResponse[]
Defined in src/Vision.ts:19
functional-types › "Vision" › Block
Interface: Block
Hierarchy
- Block
Index
Properties
Properties
blockType
• blockType: BlockType
Defined in src/Vision.ts:152
boundingBox
• boundingBox: BoundingPoly
Defined in src/Vision.ts:150
Optional
confidence
• confidence? : number
Defined in src/Vision.ts:153
paragraphs
• paragraphs: Paragraph[]
Defined in src/Vision.ts:151
Optional
property
• property? : TextProperty
Defined in src/Vision.ts:139
functional-types › "Vision" › BoundingPoly
Interface: BoundingPoly
Hierarchy
- BoundingPoly
Index
Properties
Properties
Optional
normalizedVertices
• normalizedVertices? : NormalizedVertex[]
Defined in src/Vision.ts:212
Optional
vertices
• vertices? : Vertex[]
Defined in src/Vision.ts:211
functional-types › "Vision" › DetectedBreak
Interface: DetectedBreak
Hierarchy
- DetectedBreak
Index
Properties
Properties
Optional
isPrefix
• isPrefix? : boolean
Defined in src/Vision.ts:199
type
• type: BreakType
Defined in src/Vision.ts:196
functional-types › "Vision" › DetectedLanguage
Interface: DetectedLanguage
Hierarchy
- DetectedLanguage
Index
Properties
Properties
Optional
confidence
• confidence? : number
Defined in src/Vision.ts:192
languageCode
• languageCode: string
Defined in src/Vision.ts:191
functional-types › "Vision" › EntityAnnotation
Interface: EntityAnnotation
Hierarchy
- EntityAnnotation
Index
Properties
Properties
Optional
boundingPoly
• boundingPoly? : BoundingPoly
Defined in src/Vision.ts:99
confidence
• confidence: number
Defined in src/Vision.ts:97
description
• description: string
Defined in src/Vision.ts:95
locale
• locale: string
Defined in src/Vision.ts:94
locations
• locations: LocationInfo[]
Defined in src/Vision.ts:100
mid
• mid: string
Defined in src/Vision.ts:93
properties
• properties: Property[]
Defined in src/Vision.ts:101
score
• score: number
Defined in src/Vision.ts:96
topicality
• topicality: number
Defined in src/Vision.ts:98
functional-types › "Vision" › Feature
Interface: Feature
Hierarchy
- Feature
Index
Properties
Properties
Optional
maxResult
• maxResult? : number
Defined in src/Vision.ts:78
Optional
model
• model? : "builtin/stable" | "builtin/latest"
Defined in src/Vision.ts:79
type
• type: Type
Defined in src/Vision.ts:77
functional-types › "Vision" › GcsDestination
Interface: GcsDestination
Hierarchy
- GcsDestination
Index
Properties
Properties
uri
• uri: string
Defined in src/Vision.ts:43
functional-types › "Vision" › GcsSource
Interface: GcsSource
Hierarchy
- GcsSource
Index
Properties
Properties
uri
• uri: string
Defined in src/Vision.ts:29
functional-types › "Vision" › Image
Interface: Image
Hierarchy
- Image
Index
Properties
Properties
Optional
content
• content? : Buffer
Defined in src/Vision.ts:67
Optional
source
• source? : ImageSource
Defined in src/Vision.ts:68
functional-types › "Vision" › ImageContext
Interface: ImageContext
Hierarchy
- ImageContext
Index
Properties
Properties
cropHintsParams
• cropHintsParams: unknown
Defined in src/Vision.ts:87
languageHints
• languageHints: string[]
Defined in src/Vision.ts:86
latLongRect
• latLongRect: unknown
Defined in src/Vision.ts:85
productSearchParams
• productSearchParams: unknown
Defined in src/Vision.ts:88
webDetectionParams
• webDetectionParams: unknown
Defined in src/Vision.ts:89
functional-types › "Vision" › ImageSource
Interface: ImageSource
Hierarchy
- ImageSource
Index
Properties
Properties
Optional
gcsImageUri
• gcsImageUri? : string
Defined in src/Vision.ts:72
Optional
imageUri
• imageUri? : string
Defined in src/Vision.ts:73
functional-types › "Vision" › InputConfig
Interface: InputConfig
Hierarchy
- InputConfig
Index
Properties
Properties
Optional
content
• content? : Buffer
Defined in src/Vision.ts:24
gcsSource
• gcsSource: GcsSource
Defined in src/Vision.ts:23
mimeType
• mimeType: string
Defined in src/Vision.ts:25
functional-types › "Vision" › LatLng
Interface: LatLng
Hierarchy
- LatLng
Index
Properties
Properties
latitude
• latitude: number
Defined in src/Vision.ts:250
longitude
• longitude: number
Defined in src/Vision.ts:252
functional-types › "Vision" › LocationInfo
Interface: LocationInfo
Hierarchy
- LocationInfo
Index
Properties
Properties
latLng
• latLng: LatLng
Defined in src/Vision.ts:216
functional-types › "Vision" › NormalizedVertex
Interface: NormalizedVertex
Hierarchy
-
↳ NormalizedVertex
Index
Properties
Properties
x
• x: number
Defined in src/Vision.ts:239
y
• y: number
Defined in src/Vision.ts:240
functional-types › "Vision" › OutputConfig
Interface: OutputConfig
Hierarchy
- OutputConfig
Index
Properties
Properties
Optional
batchSize
• batchSize? : number
Defined in src/Vision.ts:38
gcsDestination
• gcsDestination: GcsDestination
Defined in src/Vision.ts:39
functional-types › "Vision" › Page
Interface: Page
Hierarchy
- Page
Index
Properties
Properties
blocks
• blocks: Block[]
Defined in src/Vision.ts:127
Optional
confidence
• confidence? : number
Defined in src/Vision.ts:130
height
• height: number
Defined in src/Vision.ts:125
property
• property: TextProperty
Defined in src/Vision.ts:118
width
• width: number
Defined in src/Vision.ts:124
functional-types › "Vision" › Paragraph
Interface: Paragraph
Hierarchy
- Paragraph
Index
Properties
Properties
boundingBox
• boundingBox: BoundingPoly
Defined in src/Vision.ts:158
confidence
• confidence: number
Defined in src/Vision.ts:160
Optional
property
• property? : TextProperty
Defined in src/Vision.ts:157
words
• words: Word[]
Defined in src/Vision.ts:159
functional-types › "Vision" › Property
Interface: Property
Hierarchy
- Property
Index
Properties
Properties
name
• name: string
Defined in src/Vision.ts:220
uint64Value
• uint64Value: number
Defined in src/Vision.ts:222
value
• value: string
Defined in src/Vision.ts:221
functional-types › "Vision" › TextAnnotation
Interface: TextAnnotation
Hierarchy
- TextAnnotation
Index
Properties
Properties
pages
• pages: Page[]
Defined in src/Vision.ts:110
text
• text: string
Defined in src/Vision.ts:113
functional-types › "Vision" › TextProperty
Interface: TextProperty
Hierarchy
- TextProperty
Index
Properties
Properties
Optional
detectedBreak
• detectedBreak? : DetectedBreak
Defined in src/Vision.ts:135
detectedLanguages
• detectedLanguages: DetectedLanguage[]
Defined in src/Vision.ts:134
functional-types › "Vision" › TextSymbol
Interface: TextSymbol
Hierarchy
- TextSymbol
Index
Properties
Properties
Optional
boundingBox
• boundingBox? : BoundingPoly
Defined in src/Vision.ts:181
confidence
• confidence: number
Defined in src/Vision.ts:183
property
• property: TextProperty
Defined in src/Vision.ts:180
text
• text: string
Defined in src/Vision.ts:182
functional-types › "Vision" › Vertex
Interface: Vertex
Hierarchy
Vertex
Index
Properties
Properties
x
• x: number
Defined in src/Vision.ts:230
y
• y: number
Defined in src/Vision.ts:231
functional-types › "Vision" › Word
Interface: Word
Hierarchy
- Word
Index
Properties
Properties
boundingBox
• boundingBox: BoundingPoly
Defined in src/Vision.ts:174
confidence
• confidence: number
Defined in src/Vision.ts:176
Optional
property
• property? : TextProperty
Defined in src/Vision.ts:173
symbols
• symbols: TextSymbol[]
Defined in src/Vision.ts:175
Modules
functional-types › "Comparable"
Module: "Comparable"
Index
Interfaces
Type aliases
Variables
- applyGettables
- applySchema
- fromForest
- fromForestByLabel
- fromForestByPage
- fromTable
- fromTableByName
- getBranchOptionsFromGettables
- getKeysFromPredicate
- getLeafOptionsFromGettable
- getPredicateFromPathSegment
- makeComparables
- unnest
- view
Functions
- applyPath
- findKeyFromPredicate
- findNodeFromPredicate
- fromBranch
- fromCell
- fromCellByName
- getKeyFromPredicate
- getTableOptions
- isComparable
- isLeaf
- isMetadata
- isTree
- makeComparable
- makeLeaf
- partition
- partitionGettables
- satisfyProperties
- setKeys
- splitTable
- translateNode
- translateTree
- viewTree
Type aliases
Direction
Ƭ Direction: "column" | "row"
Defined in src/Comparable.ts:72
FromBranchOptions
Ƭ FromBranchOptions: FromLeafOptions[]
Defined in src/Comparable.ts:125
Mapping
Ƭ Mapping: Dictionary‹string›
Defined in src/Comparable.ts:75
Node
Defined in src/Comparable.ts:92
Path
Ƭ Path: Predicate[]
Defined in src/Comparable.ts:74
Predicate
Ƭ Predicate: function
Defined in src/Comparable.ts:73
Type declaration:
▸ (value
: string): boolean
Parameters:
Name | Type |
---|---|
value |
string |
TreeByFile
Ƭ TreeByFile: Dictionary‹Tree›
Defined in src/Comparable.ts:90
TreeView
Ƭ TreeView: Dictionary‹TreeView | string›
Defined in src/Comparable.ts:103
Variables
Const
applyGettables
• applyGettables: function = pipe(
pipe(fromForestByLabel, R.local(getBranchOptionsFromGettables)),
R.map<Tree, R.Reader<S.Gettable, O.Option
Defined in src/Comparable.ts:838
applyGettables :: ForestByLabel -> Reader Gettables Tree
Type declaration:
▸ (forest
: D.ForestByLabel): Reader‹S.Gettables, Tree›
Parameters:
Name | Type |
---|---|
forest |
D.ForestByLabel |
Const
applySchema
• applySchema: function = pipe( pipe( partitionGettables, R.local(prop('gettables') as R.Reader<S.Schema, S.Gettables>) ), R.map( mapObjIndexed<PartitionedGettables, Tree>(({ annotation, gettables }) => pipe( prop('forestByPage'), D.mergeForestByPage, applyGettables )(annotation)(gettables) ) ) )
Defined in src/Comparable.ts:918
applySchema :: [DocumentAnnotation] -> Reader Schema TreeByFile
Type declaration:
▸ (annotations
: DocumentAnnotation[]): Reader‹Schema, TreeByFile›
Parameters:
Name | Type |
---|---|
annotations |
DocumentAnnotation[] |
Const
fromForest
• fromForest: function = pipe(D.mergeForest, fromForestByLabel)
Defined in src/Comparable.ts:527
fromForest :: Forest -> Reader FromBranchOptions Tree
Type declaration:
▸ (forest
: D.Forest): Reader‹FromBranchOptions, Tree›
Parameters:
Name | Type |
---|---|
forest |
D.Forest |
Const
fromForestByLabel
• fromForestByLabel: function = pipe( mapObjIndexed(fromBranch), sequenceS(R.reader) )
Defined in src/Comparable.ts:515
fromForestByLabel :: ForestByLabel -> Reader FromBranchOptions Tree
Type declaration:
▸ (forest
: D.ForestByLabel): Reader‹FromBranchOptions, Tree›
Parameters:
Name | Type |
---|---|
forest |
D.ForestByLabel |
Const
fromForestByPage
• fromForestByPage: function = pipe( D.mergeForestByPage, fromForestByLabel )
Defined in src/Comparable.ts:536
fromForestByPage :: ForestByPage -> Reader FromBranchOptions Tree
Type declaration:
▸ (forestByPage
: D.ForestByPage): Reader‹FromBranchOptions, Tree›
Parameters:
Name | Type |
---|---|
forestByPage |
D.ForestByPage |
Const
fromTable
• fromTable: function = pipe(splitTable, R.chain(setKeys))
Defined in src/Comparable.ts:335
fromTable :: Table -> Reader FromTableOptions Tree
Type declaration:
▸ (table
: Table): Reader‹FromTableOptions, Tree›
Parameters:
Name | Type |
---|---|
table |
Table |
Const
fromTableByName
• fromTableByName: function = pipe(
mapObjIndexed<D.Table, R.Reader<FromBranchOptions, O.Option
Defined in src/Comparable.ts:435
fromTableByName :: TableByName -> Reader FromBranchOptions Tree
Type declaration:
▸ (tables
: D.TableByName): Reader‹FromBranchOptions, Tree›
Parameters:
Name | Type |
---|---|
tables |
D.TableByName |
Const
getBranchOptionsFromGettables
• getBranchOptionsFromGettables: function = pipe( values as R.Reader<S.Gettables, S.Gettable[]>, map(getLeafOptionsFromGettable) )
Defined in src/Comparable.ts:630
getBranchOptionsFromGettables :: Gettables -> FromBranchOptions
Type declaration:
▸ (gettables
: S.Gettables): FromBranchOptions
Parameters:
Name | Type |
---|---|
gettables |
S.Gettables |
Const
getKeysFromPredicate
• getKeysFromPredicate: function = pipe( mapObjIndexed((node: Tree, key: string) => pipe(getKeyFromPredicate, R.map(O.getOrElse(() => key)))(node) ), sequenceS(R.reader) )
Defined in src/Comparable.ts:300
getKeysFromPredicate :: Tree -> Reader Predicate String
Type declaration:
▸ (tree
: Tree): Reader‹Predicate, Mapping›
Parameters:
Name | Type |
---|---|
tree |
Tree |
Const
getLeafOptionsFromGettable
• getLeafOptionsFromGettable: function = applySpec({ predicate: getPredicateFromGettable, key: getKeyPredicateFromGettable, mergeKey: hasMergeType('header'), splitBy: getDirectionFromGettable, })
Defined in src/Comparable.ts:616
getLeafOptionsFromGettable :: Gettable -> FromLeafOptions
Type declaration:
▸ (gettable
: Gettable): FromLeafOptions
Parameters:
Name | Type |
---|---|
gettable |
Gettable |
Const
getPredicateFromPathSegment
• getPredicateFromPathSegment: function = pipe(when(S.isPredicate, prop('value')), regExpTest)
Defined in src/Comparable.ts:642
getPredicateFromPathSegment :: PathSegment -> Predicate
Type declaration:
▸ (segment
: PathSegment): Predicate
Parameters:
Name | Type |
---|---|
segment |
PathSegment |
Const
makeComparables
• makeComparables: function = pipe( applySchema, R.chain( pipe( mapObjIndexed<Tree, RIO.ReaderIO<S.Schema, Comparable>>((tree, file) => makeComparable(tree, file) ), values, RIO.sequenceReaderIO ) ) )
Defined in src/Comparable.ts:963
makeComparables :: [DocumentAnnotation] -> ReaderIO Schema [Comparable]
Type declaration:
▸ (annotations
: DocumentAnnotation[]): RIO.ReaderIO‹Schema, Comparable[]›
Parameters:
Name | Type |
---|---|
annotations |
DocumentAnnotation[] |
Const
unnest
• unnest: function = unless<Tree, Tree>( isEmpty, pipe(values as R.Reader<Tree, Tree[]>, head as R.Reader<Tree[], Tree>) )
Defined in src/Comparable.ts:226
unnest :: Tree -> Tree
Type declaration:
Parameters:
Name | Type |
---|---|
tree |
Tree |
Const
view
• view: function = evolve({ attributes: viewTree, })
Defined in src/Comparable.ts:557
view :: Comparable -> ComparableView
Type declaration:
▸ (comparable
: Comparable): ComparableView
Parameters:
Name | Type |
---|---|
comparable |
Comparable |
Functions
Const
applyPath
▸ applyPath(node
: Tree | Leaf): (Anonymous function)
Defined in src/Comparable.ts:680
applyPath :: Tree -> Reader Path (Option Tree)
Parameters:
Name | Type |
---|---|
node |
Tree | Leaf |
Returns: (Anonymous function)
Const
findKeyFromPredicate
▸ findKeyFromPredicate(tree
: Tree): (Anonymous function)
Defined in src/Comparable.ts:262
findKeyFromPredicate :: Tree -> Reader Predicate (Option String)
Parameters:
Name | Type |
---|---|
tree |
Tree |
Returns: (Anonymous function)
Const
findNodeFromPredicate
▸ findNodeFromPredicate(tree
: Tree): Reader‹function, None | Some‹Tree | Leaf››
Defined in src/Comparable.ts:274
findNodeFromPredicate :: Tree -> Reader Predicate (Option Node)
Parameters:
Name | Type |
---|---|
tree |
Tree |
Returns: Reader‹function, None | Some‹Tree | Leaf››
fromBranch
▸ fromBranch(branch
: Branch): Reader‹FromBranchOptions, Tree›
Defined in src/Comparable.ts:482
fromBranch :: Branch -> Reader FromBranchOptions Tree
Parameters:
Name | Type |
---|---|
branch |
Branch |
Returns: Reader‹FromBranchOptions, Tree›
Const
fromCell
▸ fromCell(cell
: Cell): object
Defined in src/Comparable.ts:460
fromCell :: Cell -> Node
Parameters:
Name | Type |
---|---|
cell |
Cell |
Returns: object
value: string = cell.text
metadata: object
Const
fromCellByName
▸ fromCellByName(cells
: Dictionary‹Cell›): (Anonymous function)
Defined in src/Comparable.ts:474
fromCellByName :: CellByName -> Reader FromBranchOptions Node
Parameters:
Name | Type |
---|---|
cells |
Dictionary‹Cell› |
Returns: (Anonymous function)
Const
getKeyFromPredicate
▸ getKeyFromPredicate(tree
: Tree): Reader‹function, None | Some‹string››
Defined in src/Comparable.ts:288
getKeyFromPredicate :: Tree -> Reader Predicate (Option String)
Parameters:
Name | Type |
---|---|
tree |
Tree |
Returns: Reader‹function, None | Some‹string››
Const
getTableOptions
▸ getTableOptions(key
: string): function
Defined in src/Comparable.ts:424
getTableOptions :: String -> Reader FromBranchOptions (Option FromTableOptions)
Parameters:
Name | Type |
---|---|
key |
string |
Returns: function
▸ (x0
: V0): T2
Parameters:
Name | Type |
---|---|
x0 |
V0 |
Const
isComparable
▸ isComparable(a
: unknown): a is Comparable
Defined in src/Comparable.ts:166
isComparable :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Comparable
Const
isLeaf
▸ isLeaf(a
: unknown): a is Leaf
Defined in src/Comparable.ts:145
isLeaf :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Leaf
Const
isMetadata
▸ isMetadata(a
: unknown): a is Metadata
Defined in src/Comparable.ts:137
isMetadata :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Metadata
isTree
▸ isTree(a
: unknown): a is Tree
Defined in src/Comparable.ts:157
isTree :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Tree
Const
makeComparable
▸ makeComparable(tree
: Tree, file
: string): (Anonymous function)
Defined in src/Comparable.ts:944
makeComparables :: (Tree, String) -> ReaderIO Schema Comparable
Parameters:
Name | Type |
---|---|
tree |
Tree |
file |
string |
Returns: (Anonymous function)
Const
makeLeaf
▸ makeLeaf(value
: string): object
Defined in src/Comparable.ts:217
makeLeaf :: String -> Leaf
Parameters:
Name | Type |
---|---|
value |
string |
Returns: object
- value: string
Const
partition
▸ partition(branch
: Branch): (Anonymous function)
Defined in src/Comparable.ts:402
partition :: Descendant -> Reader FromBranchOptions Format DescendantByLabel
Parameters:
Name | Type |
---|---|
branch |
Branch |
Returns: (Anonymous function)
Const
partitionGettables
▸ partitionGettables(annotations
: DocumentAnnotation[]): function
Defined in src/Comparable.ts:878
partitionGettables :: [DocumentAnnotation] -> Reader Gettables (Dictionary Gettables)
Parameters:
Name | Type |
---|---|
annotations |
DocumentAnnotation[] |
Returns: function
▸ (x
: V0): T5
Parameters:
Name | Type |
---|---|
x |
V0 |
Const
satisfyProperties
▸ satisfyProperties(node
: Tree | Leaf): function
Defined in src/Comparable.ts:664
satisfyProperties :: Tree -> Reader [Property] Bool
Parameters:
Name | Type |
---|---|
node |
Tree | Leaf |
Returns: function
▸ (list
: keyof T[]): boolean
Parameters:
Name | Type |
---|---|
list |
keyof T[] |
Const
setKeys
▸ setKeys(tree
: Tree): Reader‹FromTableOptions, object›
Defined in src/Comparable.ts:314
setKeys :: Tree -> Reader PredicateStr Tree
Parameters:
Name | Type |
---|---|
tree |
Tree |
Returns: Reader‹FromTableOptions, object›
Const
splitTable
▸ splitTable(table
: Table): (Anonymous function)
Defined in src/Comparable.ts:238
splitTable :: Table -> Reader Direction Tree
Parameters:
Name | Type |
---|---|
table |
Table |
Returns: (Anonymous function)
Const
translateNode
▸ translateNode(node
: Tree | Leaf): (Anonymous function)
Defined in src/Comparable.ts:728
translateNode :: Node -> Reader Path Node
Parameters:
Name | Type |
---|---|
node |
Tree | Leaf |
Returns: (Anonymous function)
Const
translateTree
▸ translateTree(tree
: Tree): (Anonymous function)
Defined in src/Comparable.ts:753
translateTree :: Tree -> Reader Gettables Tree
Parameters:
Name | Type |
---|---|
tree |
Tree |
Returns: (Anonymous function)
viewTree
▸ viewTree(tree
: Tree): TreeView
Defined in src/Comparable.ts:548
viewTree :: Tree -> TreeView
Parameters:
Name | Type |
---|---|
tree |
Tree |
Returns: TreeView
Module: "DateTime"
Index
Variables
Functions
Variables
Const
getCurrentUnixTimestamp
• getCurrentUnixTimestamp: function = Date.now
Defined in src/DateTime.ts:14
getCurrentUnixTimestamp :: () -> Int
Type declaration:
▸ (): number
Functions
Const
getCurrentDate
▸ getCurrentDate(): Date
Defined in src/DateTime.ts:21
getCurrentDate :: () -> Date
Returns: Date
Const
getCurrentISOString
▸ getCurrentISOString(): string
Defined in src/DateTime.ts:28
getCurrentISOString :: () -> string
Returns: string
Const
getUnixTimestamp
▸ getUnixTimestamp(date
: Date): number
Defined in src/DateTime.ts:6
getUnixTimestamp :: Date -> Int
Parameters:
Name | Type |
---|---|
date |
Date |
Returns: number
functional-types › "DocumentAnnotation"
Module: "DocumentAnnotation"
Index
Interfaces
Type aliases
- CellByName
- DocumentAnnotationBase
- Forest
- ForestByLabel
- ForestByPage
- Leaf
- TableBase
- TableByName
- TableCellById
- TextCell
- TextTableCell
- Tree
Variables
Functions
- isBranch
- isCell
- isCellArray
- isDocumentAnnotation
- isForest
- isForestByPage
- isLeaf
- isNode
- isTable
- isTableCell
- isTableCellById
- isTree
- makeCell
- makeForestByPage
- makeNode
- makeTable
- makeTableCell
- makeTextCell
- makeTextTableCell
Type aliases
CellByName
Ƭ CellByName: Dictionary‹Cell›
Defined in src/DocumentAnnotation.ts:81
DocumentAnnotationBase
Ƭ DocumentAnnotationBase: Pick‹DocumentAnnotation, "file" | "forestByPage"›
Defined in src/DocumentAnnotation.ts:130
Forest
Ƭ Forest: Dictionary‹Tree›
Defined in src/DocumentAnnotation.ts:116
ForestByLabel
Ƭ ForestByLabel: Dictionary‹Branch›
Defined in src/DocumentAnnotation.ts:120
ForestByPage
Ƭ ForestByPage: Forest[]
Defined in src/DocumentAnnotation.ts:118
Leaf
Defined in src/DocumentAnnotation.ts:103
TableBase
Ƭ TableBase: Omit‹Table, "id" | "label" | "boundingPoly"›
Defined in src/DocumentAnnotation.ts:101
TableByName
Ƭ TableByName: Dictionary‹Table›
Defined in src/DocumentAnnotation.ts:99
TableCellById
Ƭ TableCellById: Dictionary‹TableCell›
Defined in src/DocumentAnnotation.ts:88
TextCell
Ƭ TextCell: Pick‹Cell, "text"›
Defined in src/DocumentAnnotation.ts:135
TextTableCell
Ƭ TextTableCell: TextCell & object
Defined in src/DocumentAnnotation.ts:137
Tree
Defined in src/DocumentAnnotation.ts:114
Variables
Const
getKeyFromLeaf
• getKeyFromLeaf: function = ifElse( isTable, path(['intersectHeader', 'text']), prop('text') )
Defined in src/DocumentAnnotation.ts:672
getKeyFromLeaf :: Leaf -> String
Type declaration:
▸ (leaf
: Leaf): string
Parameters:
Name | Type |
---|---|
leaf |
Leaf |
Const
make
• make: function = pipe( sequenceS(R.reader)({ file: getFileNameIO, forestByPage: makeForestByPage, }), sequenceS(R.reader), R.map(sequenceS(IO.io)), RIO.chainIOK(fromDocumentBase) )
Defined in src/DocumentAnnotation.ts:615
make :: TableAnnotation -> ReaderIO TextAnnotation DocumentAnnotation
Type declaration:
▸ (tableAnnotation
: TableAnnotation): RIO.ReaderIO‹TextAnnotation, DocumentAnnotation›
Parameters:
Name | Type |
---|---|
tableAnnotation |
TableAnnotation |
Const
makeForest
• makeForest: function = pipe( values, makeTrees, RIO.map(reduce((acc: Forest, child: Tree) => assoc(child.id, child, acc), {})) )
Defined in src/DocumentAnnotation.ts:544
makeForest :: BoundingBoxes -> ReaderIO Page Forest
Type declaration:
▸ (boundingBoxes
: BoundingBoxes): RIO.ReaderIO‹Page, Forest›
Parameters:
Name | Type |
---|---|
boundingBoxes |
BoundingBoxes |
Const
makeLeaf
• makeLeaf: function = ifElse(hasRowsOrColumns, makeTable, makeCell)
Defined in src/DocumentAnnotation.ts:471
makeLeaf :: LabeledBoundingBox -> ReaderIO Page Leaf
Type declaration:
▸ (boundingBox
: LabeledBoundingBox): RIO.ReaderIO‹Page, Leaf›
Parameters:
Name | Type |
---|---|
boundingBox |
LabeledBoundingBox |
Const
mergeForest
• mergeForest: function = pipe(
values as R.Reader<Forest, Tree[]>,
reduce<Tree, Dictionary
const oldTree = acc[label];
const accChildren = oldTree?.children || [];
const newChildren = isLeaf(newTree) ? [newTree] : newTree.children;
const id = oldTree ? `${oldTree.id},${newTree.id}` : newTree.id;
const boundingPoly = oldTree
? unions(oldTree.boundingPoly)(newTree.boundingPoly)
: newTree.boundingPoly;
const children = concat(accChildren, newChildren);
const tree = { id, label, boundingPoly, children };
return assoc(label, tree, acc);
}, {}) )
Defined in src/DocumentAnnotation.ts:681
mergeForest :: Forest -> ForestByLabel
Type declaration:
▸ (forest
: Forest): ForestByLabel
Parameters:
Name | Type |
---|---|
forest |
Forest |
Const
mergeForestByPage
• mergeForestByPage: function = pipe(mergeAll, mergeForest)
Defined in src/DocumentAnnotation.ts:704
mergeForestByPage :: ForestByPage -> ForestByLabel
Type declaration:
▸ (forestByPage
: ForestByPage): ForestByLabel
Parameters:
Name | Type |
---|---|
forestByPage |
ForestByPage |
Const
toTextCell
• toTextCell: function = pick(['text'])
Defined in src/DocumentAnnotation.ts:654
toTextCell: Cell -> TextCell
Type declaration:
Parameters:
Name | Type |
---|---|
cell |
Cell |
Const
toTextTableCell
• toTextTableCell: function = pipe( evolve({ rowHeader: toTextCell, columnHeader: toTextCell, }), pick(['text', 'rowHeader', 'columnHeader']) )
Defined in src/DocumentAnnotation.ts:661
toTextTableCell :: TableCell -> TextTableCell
Type declaration:
▸ (tableCell
: TableCell): TextTableCell
Parameters:
Name | Type |
---|---|
tableCell |
TableCell |
Functions
Const
isBranch
▸ isBranch(a
: unknown): a is Branch
Defined in src/DocumentAnnotation.ts:233
isBranch :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Branch
Const
isCell
▸ isCell(a
: unknown): a is Cell
Defined in src/DocumentAnnotation.ts:160
isCell :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Cell
Const
isCellArray
▸ isCellArray(a
: unknown): a is Cell[]
Defined in src/DocumentAnnotation.ts:172
isCellArray :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Cell[]
Const
isDocumentAnnotation
▸ isDocumentAnnotation(a
: unknown): a is DocumentAnnotation
Defined in src/DocumentAnnotation.ts:272
isDocumentAnnotation :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is DocumentAnnotation
Const
isForest
▸ isForest(a
: unknown): a is Forest
Defined in src/DocumentAnnotation.ts:256
isForest :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Forest
Const
isForestByPage
▸ isForestByPage(a
: unknown): a is ForestByPage
Defined in src/DocumentAnnotation.ts:264
isForestByPage :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is ForestByPage
Const
isLeaf
▸ isLeaf(a
: unknown): a is Leaf
Defined in src/DocumentAnnotation.ts:226
isLeaf :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Leaf
Const
isNode
▸ isNode(a
: unknown): a is Node
Defined in src/DocumentAnnotation.ts:147
isLeaf :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Node
Const
isTable
▸ isTable(a
: unknown): a is Table
Defined in src/DocumentAnnotation.ts:210
isTable :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Table
Const
isTableCell
▸ isTableCell(a
: unknown): a is TableCell
Defined in src/DocumentAnnotation.ts:180
isTableCell :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is TableCell
Const
isTableCellById
▸ isTableCellById(a
: unknown): a is TableCellById
Defined in src/DocumentAnnotation.ts:192
isTableCellById :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is TableCellById
Const
isTree
▸ isTree(a
: unknown): a is Tree
Defined in src/DocumentAnnotation.ts:249
isTree :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Tree
Const
makeCell
▸ makeCell(boundingBox
: LabeledBoundingBox): (Anonymous function)
Defined in src/DocumentAnnotation.ts:302
makeCell :: LabeledBoundingBox -> ReaderIO Page Cell
Parameters:
Name | Type |
---|---|
boundingBox |
LabeledBoundingBox |
Returns: (Anonymous function)
Const
makeForestByPage
▸ makeForestByPage(tableAnnotation
: TableAnnotation): (Anonymous function)
Defined in src/DocumentAnnotation.ts:582
makeForestByPage :: TableAnnotation -> ReaderIO TextAnnotation ForestByPage
Parameters:
Name | Type |
---|---|
tableAnnotation |
TableAnnotation |
Returns: (Anonymous function)
Const
makeNode
▸ makeNode(__namedParameters
: object): (Anonymous function)
Defined in src/DocumentAnnotation.ts:286
makeNode :: LabeledBoundingBox -> IO Node
Parameters:
▪ __namedParameters: object
Name | Type |
---|---|
boundingPoly |
[Vertex, Vertex, Vertex, Vertex] |
label |
string |
Returns: (Anonymous function)
Const
makeTable
▸ makeTable(boundingBox
: LabeledBoundingBox): (Anonymous function)
Defined in src/DocumentAnnotation.ts:388
makeTable :: LabeledBoundingBox -> ReaderIO Page Table
Parameters:
Name | Type |
---|---|
boundingBox |
LabeledBoundingBox |
Returns: (Anonymous function)
Const
makeTableCell
▸ makeTableCell(rowHeader
: Cell, columnHeader
: Cell): function
Defined in src/DocumentAnnotation.ts:325
makeTableCell :: (Cell, Cell) -> LabeledBoundingBox -> ReaderIO Page TableCell
Parameters:
Name | Type |
---|---|
rowHeader |
Cell |
columnHeader |
Cell |
Returns: function
▸ (x0
: V0): T2
Parameters:
Name | Type |
---|---|
x0 |
V0 |
Const
makeTextCell
▸ makeTextCell(text
: string): object
Defined in src/DocumentAnnotation.ts:632
makeTextCell :: String -> TextCell
Parameters:
Name | Type |
---|---|
text |
string |
Returns: object
- text: string
Const
makeTextTableCell
▸ makeTextTableCell(text
: string, rowHeader
: string, columnHeader
: string): object
Defined in src/DocumentAnnotation.ts:643
makeTextTableCell :: (String, String, String) -> TextTableCell
Parameters:
Name | Type |
---|---|
text |
string |
rowHeader |
string |
columnHeader |
string |
Returns: object
columnHeader(): object
rowHeader(): object
Module: "Excel"
Index
Type aliases
Functions
Type aliases
Cell
Ƭ Cell: string
Defined in src/Excel.ts:13
Excel
Ƭ Excel: Dictionary‹Sheet›
Defined in src/Excel.ts:16
Row
Ƭ Row: Dictionary‹Cell›
Defined in src/Excel.ts:14
Sheet
Ƭ Sheet: Row[]
Defined in src/Excel.ts:15
Functions
Const
isCell
▸ isCell(a
: unknown): a is Row
Defined in src/Excel.ts:23
isCell :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Row
Const
isExcel
▸ isExcel(a
: unknown): a is Excel
Defined in src/Excel.ts:47
isExcel :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Excel
Const
isRow
▸ isRow(a
: unknown): a is Row
Defined in src/Excel.ts:31
isRow :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Row
Const
isSheet
▸ isSheet(a
: unknown): a is Row
Defined in src/Excel.ts:39
isSheet :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Row
Module: "FileType"
Index
Type aliases
Variables
- contentTypes
- documentTypes
- fileContentTypes
- fileTypes
- fromContentType
- fromDocumentContentType
- fromImageContentType
- imageContentTypes
- imageTypes
- toContentType
- toDocumentContentType
- toImageContentType
Functions
Type aliases
ContentType
Ƭ ContentType: DocumentContentType | ImageContentType
Defined in src/FileType.ts:26
DocumentContentType
Ƭ DocumentContentType: "application/pdf" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/json"
Defined in src/FileType.ts:19
DocumentType
Ƭ DocumentType: "pdf" | "excel" | "json"
Defined in src/FileType.ts:13
FileType
Ƭ FileType: DocumentType | ImageType
Defined in src/FileType.ts:17
ImageContentType
Ƭ ImageContentType: "image/png" | "image/jpeg"
Defined in src/FileType.ts:24
ImageType
Ƭ ImageType: "png" | "jpeg"
Defined in src/FileType.ts:15
Variables
Const
contentTypes
• contentTypes: ContentType[] = values(FileTypeToContentType)
Defined in src/FileType.ts:151
contentTypes: [ContentType]
Const
documentTypes
• documentTypes: DocumentType[] = keys(DocumentTypeToContentType)
Defined in src/FileType.ts:112
documentTypes: [DocumentType]
Const
fileContentTypes
• fileContentTypes: DocumentContentType[] = values( DocumentTypeToContentType )
Defined in src/FileType.ts:133
contentTypes: [DocumentContentType]
Const
fileTypes
• fileTypes: FileType[] = keys(FileTypeToContentType)
Defined in src/FileType.ts:126
fileTypes: [FileType]
Const
fromContentType
• fromContentType: function = prop( __, ContentTypeToFileType )
Defined in src/FileType.ts:252
fromContentType :: ContentType -> FileType
Type declaration:
▸ (contentType
: ContentType): FileType
Parameters:
Name | Type |
---|---|
contentType |
ContentType |
Const
fromDocumentContentType
• fromDocumentContentType: function = prop(__, ContentTypeToDocumentType)
Defined in src/FileType.ts:234
fromDocumentContentType :: DocumentContentType -> DocumentType
Type declaration:
▸ (contentType
: DocumentContentType): DocumentType
Parameters:
Name | Type |
---|---|
contentType |
DocumentContentType |
Const
fromImageContentType
• fromImageContentType: function = prop(__, ContentTypeToImageType)
Defined in src/FileType.ts:243
fromImageContentType :: DocumentContentType -> DocumentType
Type declaration:
▸ (contentType
: ImageContentType): ImageType
Parameters:
Name | Type |
---|---|
contentType |
ImageContentType |
Const
imageContentTypes
• imageContentTypes: ImageContentType[] = values( ImageTypeToContentType )
Defined in src/FileType.ts:142
imageContentTypes: [DocumentContentType]
Const
imageTypes
• imageTypes: ImageType[] = keys(ImageTypeToContentType)
Defined in src/FileType.ts:119
imageTypes: [DocumentType]
Const
toContentType
• toContentType: function = prop( __, FileTypeToContentType )
Defined in src/FileType.ts:224
toContentType :: FileType -> ContentType
Type declaration:
▸ (fileType
: FileType): ContentType
Parameters:
Name | Type |
---|---|
fileType |
FileType |
Const
toDocumentContentType
• toDocumentContentType: function = prop(__, DocumentTypeToContentType)
Defined in src/FileType.ts:206
toDocumentContentType :: DocumentType -> DocumentContentType
Type declaration:
▸ (fileType
: DocumentType): DocumentContentType
Parameters:
Name | Type |
---|---|
fileType |
DocumentType |
Const
toImageContentType
• toImageContentType: function = prop(__, ImageTypeToContentType)
Defined in src/FileType.ts:215
toImageContentType :: DocumentType -> ImageContentType
Type declaration:
▸ (imageType
: ImageType): ImageContentType
Parameters:
Name | Type |
---|---|
imageType |
ImageType |
Functions
Const
isContentType
▸ isContentType(a
: unknown): a is ContentType
Defined in src/FileType.ts:198
isContentType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is ContentType
Const
isDocumentContentType
▸ isDocumentContentType(a
: unknown): a is DocumentContentType
Defined in src/FileType.ts:182
isDocumentContentType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is DocumentContentType
Const
isDocumentType
▸ isDocumentType(a
: unknown): a is DocumentType
Defined in src/FileType.ts:158
isDocumentType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is DocumentType
Const
isFileType
▸ isFileType(a
: unknown): a is ImageType
Defined in src/FileType.ts:174
isFileType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is ImageType
Const
isImageContentType
▸ isImageContentType(a
: unknown): a is ImageContentType
Defined in src/FileType.ts:190
isDocumentContentType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is ImageContentType
Const
isImageType
▸ isImageType(a
: unknown): a is ImageType
Defined in src/FileType.ts:166
isImageType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is ImageType
functional-types › "Folder/Arbitraries"
Module: "Folder/Arbitraries"
Index
Functions
Functions
Const
file
▸ file(): Arbitrary‹File›
Defined in src/Folder/Arbitraries.ts:47
Returns: Arbitrary‹File›
Const
filesByType
▸ filesByType(): Arbitrary‹FilesByType›
Defined in src/Folder/Arbitraries.ts:57
Returns: Arbitrary‹FilesByType›
Const
folder
▸ folder(): Arbitrary‹Folder›
Defined in src/Folder/Arbitraries.ts:29
Returns: Arbitrary‹Folder›
Const
invalidFolderObject
▸ invalidFolderObject(): Arbitrary‹Record‹string, any››
Defined in src/Folder/Arbitraries.ts:5
Returns: Arbitrary‹Record‹string, any››
Const
metadata
▸ metadata(): Arbitrary‹Metadata›
Defined in src/Folder/Arbitraries.ts:32
Returns: Arbitrary‹Metadata›
Const
nonFolderObject
▸ nonFolderObject(): Arbitrary‹unknown›
Defined in src/Folder/Arbitraries.ts:15
Returns: Arbitrary‹unknown›
functional-types › "Folder/index"
Module: "Folder/index"
Index
Interfaces
Type aliases
Variables
Functions
- fromMetadata
- isFile
- isFileArray
- isFilesByType
- isFolder
- isFolderReference
- isMetadata
- isReference
- make
- makeFolderReference
- makeReference
Type aliases
File
Ƭ File: Attributes & object
Defined in src/Folder/index.ts:57
FilesByType
Ƭ FilesByType: Record‹FT.DocumentType, File[]›
Defined in src/Folder/index.ts:59
Variables
Const
getAttributesFromName
• getAttributesFromName: function = pipe( split('/'), E.fromPredicate( (segments: string[]) => segments.length >= 2, () => new Error('Invalid file name format.') ), E.map(([folder, ...names]: string[]) => { const name = names.join('/'); return { id: join('/')([folder, name]), folder, name, }; }) )
Defined in src/Folder/index.ts:166
getAttributesFromName :: String -> Either Attributes Error
Type declaration:
▸ (name
: string): E.Either‹Error, Omit‹Attributes, "type"››
Parameters:
Name | Type |
---|---|
name |
string |
Const
getFileNameFromId
• getFileNameFromId: function = pipe( split('/'), last as R.Reader<string[], string> )
Defined in src/Folder/index.ts:227
getFileNameFromId :: String -> String
Type declaration:
▸ (id
: string): string
Parameters:
Name | Type |
---|---|
id |
string |
Const
getFolderFromReference
• getFolderFromReference: function = prop('folder')
Defined in src/Folder/index.ts:256
getFolderFromReference :: FolderReference -> String
Type declaration:
▸ (reference
: FolderReference): string
Parameters:
Name | Type |
---|---|
reference |
FolderReference |
Functions
Const
fromMetadata
▸ fromMetadata(metadata
: Metadata): Left‹Error› | Right‹object›
Defined in src/Folder/index.ts:189
fromMetadata :: Metadata -> Either
Parameters:
Name | Type |
---|---|
metadata |
Metadata |
Returns: Left‹Error› | Right‹object›
Const
isFile
▸ isFile(a
: unknown): a is File
Defined in src/Folder/index.ts:139
isFile :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is File
Const
isFileArray
▸ isFileArray(a
: unknown): a is File[]
Defined in src/Folder/index.ts:147
isFileArray :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is File[]
Const
isFilesByType
▸ isFilesByType(a
: unknown): a is FilesByType
Defined in src/Folder/index.ts:155
isFilesByType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is FilesByType
Const
isFolder
▸ isFolder(a
: unknown): a is Folder
Defined in src/Folder/index.ts:66
isFolder -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Folder
Const
isFolderReference
▸ isFolderReference(a
: unknown): a is FolderReference
Defined in src/Folder/index.ts:248
isFolderReference :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is FolderReference
Const
isMetadata
▸ isMetadata(a
: unknown): a is Metadata
Defined in src/Folder/index.ts:116
isMetadata :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Metadata
Const
isReference
▸ isReference(a
: unknown): a is Reference
Defined in src/Folder/index.ts:210
isReference :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Reference
Const
make
▸ make(name
: string): (Anonymous function)
Defined in src/Folder/index.ts:80
make :: String -> Folder
Parameters:
Name | Type |
---|---|
name |
string |
Returns: (Anonymous function)
Const
makeFolderReference
▸ makeFolderReference(folder
: string): object
Defined in src/Folder/index.ts:237
makeFolderReference :: String -> FolderReference
Parameters:
Name | Type |
---|---|
folder |
string |
Returns: object
- folder: string
Const
makeReference
▸ makeReference(file
: string): object
Defined in src/Folder/index.ts:218
makeReference :: String -> Reference
Parameters:
Name | Type |
---|---|
file |
string |
Returns: object
- file: string
functional-types › "fp-ts/ReaderIO"
Module: "fp-ts/ReaderIO"
Index
Type aliases
Variables
Functions
Type aliases
ReaderIO
Ƭ ReaderIO: Reader‹R, IO‹A››
Defined in src/fp-ts/ReaderIO.ts:6
Variables
Const
chainIOK
• chainIOK: function = pipe(IO.chain, R.map)
Defined in src/fp-ts/ReaderIO.ts:14
Type declaration:
▸ <**A**, **B**>(f
: function): function
Type parameters:
▪ A
▪ B
Parameters:
▪ f: function
▸ (a
: A): IO‹B›
Parameters:
Name | Type |
---|---|
a |
A |
▸ <**R**>(fa
: ReaderIO‹R, A›): ReaderIO‹R, B›
Type parameters:
▪ R
Parameters:
Name | Type |
---|---|
fa |
ReaderIO‹R, A› |
Const
map
• map: function = pipe(IO.map, R.map)
Defined in src/fp-ts/ReaderIO.ts:9
Type declaration:
▸ <**R**, **A**, **B**>(f
: function): function
Type parameters:
▪ R
▪ A
▪ B
Parameters:
▪ f: function
▸ (a
: A): B
Parameters:
Name | Type |
---|---|
a |
A |
▸ (fa
: ReaderIO‹R, A›): ReaderIO‹R, B›
Parameters:
Name | Type |
---|---|
fa |
ReaderIO‹R, A› |
Functions
Const
sequenceReaderIO
▸ sequenceReaderIO<**R**, **A**>(r
: ReaderIO‹R, A›[]): ReaderIO‹R, A[]›
Defined in src/fp-ts/ReaderIO.ts:19
Type parameters:
▪ R
▪ A
Parameters:
Name | Type |
---|---|
r |
ReaderIO‹R, A›[] |
Returns: ReaderIO‹R, A[]›
functional-types › "fp-ts/TaskEither"
Module: "fp-ts/TaskEither"
Index
Functions
Functions
Const
fromTask
▸ fromTask(task
: Task‹A›): TaskEither‹Error, A›
Defined in src/fp-ts/TaskEither.ts:10
fromThunk :: Task -> TaskEither
Parameters:
Name | Type |
---|---|
task |
Task‹A› |
Returns: TaskEither‹Error, A›
Module: "Json"
Index
Type aliases
Functions
Type aliases
Json
Ƭ Json: Dictionary‹unknown›
Defined in src/Json.ts:3
Functions
Const
isJson
▸ isJson(a
: unknown): a is Json
Defined in src/Json.ts:6
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Json
Module: "Label"
Index
Interfaces
Type aliases
Variables
Functions
Type aliases
ColorMappings
Ƭ ColorMappings: Record‹string, string›
Defined in src/Label.ts:9
Variables
Const
toColorMappings
• toColorMappings: function = reduce( (acc: ColorMappings, label: Label) => assoc(label.id, label.color)(acc), {} )
Defined in src/Label.ts:29
toColorMappings :: [Label] -> ColorMappings
Type declaration:
▸ (labels
: Label[]): ColorMappings
Parameters:
Name | Type |
---|---|
labels |
Label[] |
Functions
Const
isLabel
▸ isLabel(a
: unknown): a is Label
Defined in src/Label.ts:16
isLabel :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Label
Module: "Response"
Index
Interfaces
Type aliases
Variables
Functions
Type aliases
Response
Ƭ Response: Success‹T› | Failure
Defined in src/Response.ts:28
Status
Ƭ Status: 400 | 200
Defined in src/Response.ts:30
Variables
Const
fromEither
• fromEither: function = ifElse( E.isRight, pipe(prop('right'), success), pipe(prop('left'), fromError) )
Defined in src/Response.ts:80
fromEither :: Either Error a -> Response a
Type declaration:
▸ <**A**>(either
: E.Either‹Error, A›): Response‹A›
Type parameters:
▪ A
Parameters:
Name | Type |
---|---|
either |
E.Either‹Error, A› |
Const
getPayload
• getPayload: function = prop('payload')
Defined in src/Response.ts:155
getPayload :: Success a -> a
Type declaration:
▸ <**A**>(response
: Success‹A›): A
Type parameters:
▪ A
Parameters:
Name | Type |
---|---|
response |
Success‹A› |
Const
getStatusFromResponse
• getStatusFromResponse: function = ifElse( isSuccess, () => 200, () => 400 )
Defined in src/Response.ts:103
getStatusFromResponse :: Response -> Status
Type declaration:
▸ (response
: Response‹unknown›): Status
Parameters:
Name | Type |
---|---|
response |
Response‹unknown› |
Const
toEither
• toEither: function = ifElse( isSuccess, E.right, pipe((failure: Failure): Error => new Error(failure.error), E.left) )
Defined in src/Response.ts:142
toEither :: Response -> Either Response Error
Type declaration:
▸ <**A**>(response
: Response‹A›): E.Either‹Error, Success‹A››
Type parameters:
▪ A
Parameters:
Name | Type |
---|---|
response |
Response‹A› |
Const
toEmptyResponse
• toEmptyResponse: function = unless(isFailure, () => undefined)
Defined in src/Response.ts:172
toEmptyResponse :: Response -> Empty | Failure
Type declaration:
▸ <**T**>(response
: Response‹T›): Failure | undefined
Type parameters:
▪ T
Parameters:
Name | Type |
---|---|
response |
Response‹T› |
Functions
Const
fromError
▸ fromError(error
: Error): object
Defined in src/Response.ts:61
fromError :: Error -> Failure
Parameters:
Name | Type |
---|---|
error |
Error |
Returns: object
- error: string = error.message
Const
fromPredicate
▸ fromPredicate(predicate
: function, onFalse
: function): function
Defined in src/Response.ts:119
fromPredicate :: PredicateStr -> Response
Parameters:
▪ predicate: function
▸ (a
: unknown): a is A
Parameters:
Name | Type |
---|---|
a |
unknown |
▪ onFalse: function
▸ (a
: unknown): Error
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: function
▸ (obj
: T): U
Parameters:
Name | Type |
---|---|
obj |
T |
Const
getPayloadOrElse
▸ getPayloadOrElse(onFailure
: function): function
Defined in src/Response.ts:164
getPayloadOrElse :: ((Failure) -> E) -> Reader (Response a) a
Parameters:
▪ onFailure: function
▸ (failure
: Failure): E
Parameters:
Name | Type |
---|---|
failure |
Failure |
Returns: function
▸ (a
: any): any
Parameters:
Name | Type |
---|---|
a |
any |
Const
isFailure
▸ isFailure(a
: unknown): a is Failure
Defined in src/Response.ts:45
isFailure :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Failure
Const
isResponse
▸ isResponse(a
: unknown): a is Response
Defined in src/Response.ts:53
isResponse :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Response
Const
isSuccess
▸ isSuccess(a
: unknown): a is Success
Defined in src/Response.ts:37
isSuccess :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Success
Const
map
▸ map<**A**, **B**>(fa
: function): function
Defined in src/Response.ts:129
map :: (A -> B) -> Reader (Response A) (Response B)
Type parameters:
▪ A
▪ B
Parameters:
▪ fa: function
▸ (a
: A): B
Parameters:
Name | Type |
---|---|
a |
A |
Returns: function
▸ (obj
: T): U
Parameters:
Name | Type |
---|---|
obj |
T |
Const
success
▸ success(a
: A): object
Defined in src/Response.ts:70
success :: a -> Success
Parameters:
Name | Type |
---|---|
a |
A |
Returns: object
message: string = ""
payload: A = a
Const
withMessage
▸ withMessage<**A**>(message
: any): function
Defined in src/Response.ts:95
withMessage :: string -> Reader (Response a) (Response a)`
Type parameters:
▪ A
Parameters:
Name | Type |
---|---|
message |
any |
Returns: function
▸ (obj
: T): U
Parameters:
Name | Type |
---|---|
obj |
T |
Module: "Schema"
Index
Interfaces
Type aliases
Functions
- isDirection
- isFilePath
- isFilePathArray
- isGettable
- isGettableOptions
- isGettables
- isMergeType
- isMergeTypeArray
- isPath
- isPathSegment
- isPredicate
- isProperty
- isReplacement
- isReplacements
- isSchema
- isSchemaBase
- makeSchema
Type aliases
FilePath
Ƭ FilePath: [RegExp]
Defined in src/Schema.ts:53
Gettables
Ƭ Gettables: Dictionary‹Gettable›
Defined in src/Schema.ts:71
MergeType
Ƭ MergeType: "header" | "table" | "key"
Defined in src/Schema.ts:55
Path
Ƭ Path: PathSegment[]
Defined in src/Schema.ts:51
PathSegment
Ƭ PathSegment: RegExp | Predicate
Defined in src/Schema.ts:49
SchemaBase
Ƭ SchemaBase: Omit‹Schema, "created_at" | "updated_at"›
Defined in src/Schema.ts:83
Functions
Const
isDirection
▸ isDirection(a
: unknown): a is Direction
Defined in src/Schema.ts:182
isDirection :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Direction
Const
isFilePath
▸ isFilePath(a
: unknown): a is FilePath
Defined in src/Schema.ts:150
isFilePath :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is FilePath
Const
isFilePathArray
▸ isFilePathArray(a
: unknown): a is FilePath[]
Defined in src/Schema.ts:158
isFilePathArray :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is FilePath[]
Const
isGettable
▸ isGettable(a
: unknown): a is Gettable
Defined in src/Schema.ts:204
isGettable :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Gettable
Const
isGettableOptions
▸ isGettableOptions(a
: unknown): a is GettableOptions
Defined in src/Schema.ts:190
isGettableOptions :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is GettableOptions
Const
isGettables
▸ isGettables(a
: unknown): a is Gettables
Defined in src/Schema.ts:216
isGettables :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Gettables
Const
isMergeType
▸ isMergeType(a
: unknown): a is MergeType
Defined in src/Schema.ts:166
isMergeType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is MergeType
Const
isMergeTypeArray
▸ isMergeTypeArray(a
: unknown): a is MergeType[]
Defined in src/Schema.ts:174
isMergeTypeArray :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is MergeType[]
Const
isPath
▸ isPath(a
: unknown): a is Path
Defined in src/Schema.ts:142
isPath :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Path
Const
isPathSegment
▸ isPathSegment(a
: unknown): a is PathSegment
Defined in src/Schema.ts:134
isPathSegment :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is PathSegment
Const
isPredicate
▸ isPredicate(a
: unknown): a is Predicate
Defined in src/Schema.ts:122
isPredicate :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Predicate
Const
isProperty
▸ isProperty(a
: unknown): a is Property
Defined in src/Schema.ts:114
isProperty :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Property
Const
isReplacement
▸ isReplacement(a
: unknown): a is Replacement
Defined in src/Schema.ts:90
isReplacement :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Replacement
Const
isReplacements
▸ isReplacements(a
: unknown): a is Replacements
Defined in src/Schema.ts:102
isReplacements :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Replacements
Const
isSchema
▸ isSchema(a
: unknown): a is Schema
Defined in src/Schema.ts:239
isSchema :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Schema
Const
isSchemaBase
▸ isSchemaBase(a
: unknown): a is SchemaBase
Defined in src/Schema.ts:224
isSchemaBase :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is SchemaBase
Const
makeSchema
▸ makeSchema(schemaBase
: SchemaBase): (Anonymous function)
Defined in src/Schema.ts:251
makeSchema :: SchemaBase -> IO Schema
Parameters:
Name | Type |
---|---|
schemaBase |
SchemaBase |
Returns: (Anonymous function)
functional-types › "Serialize/Arbitraries"
Module: "Serialize/Arbitraries"
Index
Functions
Functions
Const
regExp
▸ regExp(): Arbitrary‹RegExp›
Defined in src/Serialize/Arbitraries.ts:5
Returns: Arbitrary‹RegExp›
Const
serializable
▸ serializable(): Arbitrary‹Serializable›
Defined in src/Serialize/Arbitraries.ts:8
Returns: Arbitrary‹Serializable›
functional-types › "Serialize/index"
Module: "Serialize/index"
Index
Type aliases
Variables
Functions
Type aliases
Deserializable
Ƭ Deserializable: string | number | Deserializable[] | Dictionary‹Deserializable›
Defined in src/Serialize/index.ts:28
Serializable
Ƭ Serializable: string | number | RegExp | Serializable[] | Dictionary‹Serializable›
Defined in src/Serialize/index.ts:21
Variables
Const
deserializeRegExp
• deserializeRegExp: function = pipe( E.fromPredicate( isRegExp, () => new Error('String is not a serialized RegExp instance.') ), E.chain( pipe(replace(/^__REGEXP__/(.*)/$/, '$1'), (regExpStr: string) => E.tryCatch((): RegExp => new RegExp(regExpStr), E.toError) ) ) )
Defined in src/Serialize/index.ts:57
deserializeRegExp :: String -> Either RegExp Error
Type declaration:
▸ (regExpStr
: string): E.Either‹Error, RegExp›
Parameters:
Name | Type |
---|---|
regExpStr |
string |
Const
serializeRegExp
• serializeRegExp: function = pipe( toString as R.Reader<RegExp, string>, concat('REGEXP') )
Defined in src/Serialize/index.ts:39
serializeRegExp :: RegExp -> String
Type declaration:
▸ (regExp
: RegExp): string
Parameters:
Name | Type |
---|---|
regExp |
RegExp |
Functions
deserialize
▸ deserialize(value
: Deserializable): E.Either‹Error, Serializable›
Defined in src/Serialize/index.ts:88
deserialize :: Deserializable -> Either Serializable Error
Parameters:
Name | Type |
---|---|
value |
Deserializable |
Returns: E.Either‹Error, Serializable›
Const
isRegExp
▸ isRegExp(a
: unknown): boolean
Defined in src/Serialize/index.ts:49
isRegExp :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: boolean
serialize
▸ serialize(value
: Serializable): Deserializable
Defined in src/Serialize/index.ts:76
serialize :: Serializable -> Deserializable
Parameters:
Name | Type |
---|---|
value |
Serializable |
Returns: Deserializable
functional-types › "Serialize/Schema"
Module: "Serialize/Schema"
Index
Interfaces
Type aliases
Functions
- deserialize
- isFilePath
- isFilePathArray
- isGettable
- isGettableOptions
- isGettables
- isPath
- isPathSegment
- isPredicate
- isProperty
- isReplacement
- isReplacements
- isSchema
- isSchemaBase
- serialize
Type aliases
FilePath
Ƭ FilePath: [string]
Defined in src/Serialize/Schema.ts:51
Gettables
Ƭ Gettables: Dictionary‹Gettable›
Defined in src/Serialize/Schema.ts:67
Path
Ƭ Path: PathSegment[]
Defined in src/Serialize/Schema.ts:49
PathSegment
Ƭ PathSegment: string | Predicate
Defined in src/Serialize/Schema.ts:47
SchemaBase
Ƭ SchemaBase: Omit‹Schema, "created_at" | "updated_at"›
Defined in src/Serialize/Schema.ts:79
Functions
Const
deserialize
▸ deserialize(deserializable
: Schema): Left‹Error› | Right‹Schema›
Defined in src/Serialize/Schema.ts:239
deserialize :: Schema -> SerializableSchema
Parameters:
Name | Type |
---|---|
deserializable |
Schema |
Returns: Left‹Error› | Right‹Schema›
Const
isFilePath
▸ isFilePath(a
: unknown): a is FilePath
Defined in src/Serialize/Schema.ts:148
isFilePath :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is FilePath
Const
isFilePathArray
▸ isFilePathArray(a
: unknown): a is FilePath[]
Defined in src/Serialize/Schema.ts:156
isFilePathArray :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is FilePath[]
Const
isGettable
▸ isGettable(a
: unknown): a is Gettable
Defined in src/Serialize/Schema.ts:178
isGettable :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Gettable
Const
isGettableOptions
▸ isGettableOptions(a
: unknown): a is GettableOptions
Defined in src/Serialize/Schema.ts:164
isGettableOptions :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is GettableOptions
Const
isGettables
▸ isGettables(a
: unknown): a is Gettables
Defined in src/Serialize/Schema.ts:190
isGettables :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Gettables
Const
isPath
▸ isPath(a
: unknown): a is Path
Defined in src/Serialize/Schema.ts:140
isPath :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Path
Const
isPathSegment
▸ isPathSegment(a
: unknown): a is PathSegment
Defined in src/Serialize/Schema.ts:132
isPathSegment :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is PathSegment
Const
isPredicate
▸ isPredicate(a
: unknown): a is Predicate
Defined in src/Serialize/Schema.ts:120
isPredicate :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Predicate
Const
isProperty
▸ isProperty(a
: unknown): a is Property
Defined in src/Serialize/Schema.ts:110
isProperty :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Property
Const
isReplacement
▸ isReplacement(a
: unknown): a is Replacement
Defined in src/Serialize/Schema.ts:86
isReplacement :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Replacement
Const
isReplacements
▸ isReplacements(a
: unknown): a is Replacements
Defined in src/Serialize/Schema.ts:98
isReplacements :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Replacements
Const
isSchema
▸ isSchema(a
: unknown): a is Schema
Defined in src/Serialize/Schema.ts:213
isSchema :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Schema
Const
isSchemaBase
▸ isSchemaBase(a
: unknown): a is SchemaBase
Defined in src/Serialize/Schema.ts:198
isSchemaBase :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is SchemaBase
Const
serialize
▸ serialize(serializable
: Schema): Schema
Defined in src/Serialize/Schema.ts:225
serialize :: SerializableSchema -> Schema
Parameters:
Name | Type |
---|---|
serializable |
Schema |
Returns: Schema
Module: "String"
Index
Variables
Variables
Const
getRandomId
• getRandomId: IO‹string› = uuid
Defined in src/String.ts:9
getRandomId: IO String
functional-types › "TableAnnotation"
Module: "TableAnnotation"
Index
Interfaces
Type aliases
Variables
Functions
Type aliases
BoundingBoxes
Ƭ BoundingBoxes: Dictionary‹WithHeader‹LabeledBoundingBox› | LabeledBoundingBox›
Defined in src/TableAnnotation.ts:18
BoundingBoxesByPage
Ƭ BoundingBoxesByPage: BoundingBoxes[]
Defined in src/TableAnnotation.ts:22
TableAnnotationBase
Ƭ TableAnnotationBase: Pick‹TableAnnotation, "file" | "boundingBoxesByPage"›
Defined in src/TableAnnotation.ts:32
Variables
Const
toBoundingBoxes
• toBoundingBoxes: function = reduce( (acc: BoundingBoxes, value) => assoc(value.id, value, acc), {} )
Defined in src/TableAnnotation.ts:86
toBoundingBoxes :: [BoundingBox] -> BoundingBoxes
Type declaration:
▸ (boundingBoxes
: Array‹WithHeader‹LabeledBoundingBox› | LabeledBoundingBox›): BoundingBoxes
Parameters:
Name | Type |
---|---|
boundingBoxes |
Array‹WithHeader‹LabeledBoundingBox› | LabeledBoundingBox› |
Functions
Const
isBoundingBoxes
▸ isBoundingBoxes(a
: unknown): a is BoundingBoxes
Defined in src/TableAnnotation.ts:42
isBoundingBoxes :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is BoundingBoxes
Const
isBoundingBoxesByPage
▸ isBoundingBoxesByPage(a
: unknown): a is BoundingBoxesByPage
Defined in src/TableAnnotation.ts:53
isBoundingBoxesByPage :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is BoundingBoxesByPage
Const
isTableAnnotation
▸ isTableAnnotation(a
: unknown): a is TableAnnotation
Defined in src/TableAnnotation.ts:73
isTableAnnotation :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is TableAnnotation
Const
isTableAnnotationBase
▸ isTableAnnotationBase(a
: unknown): a is TableAnnotationBase
Defined in src/TableAnnotation.ts:61
isTableAnnotationBase :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is TableAnnotationBase
Const
make
▸ make(__namedParameters
: object): (Anonymous function)
Defined in src/TableAnnotation.ts:100
make :: TableAnnotationBase -> IO TableAnnotation
Parameters:
▪ __namedParameters: object
Name | Type |
---|---|
boundingBoxesByPage |
Dictionary‹LabeledBoundingBox | LabeledBoundingBox & object | LabeledBoundingBox & object›[] |
file |
string |
Returns: (Anonymous function)
functional-types › "TextAnnotation"
Module: "TextAnnotation"
Index
Interfaces
Type aliases
Variables
- breakTypes
- fromAnnotateImageResponse
- fromVisionPage
- getBreakTypeFromSymbols
- getStringFromBreakType
- getTextFromWords
Functions
- fromAnnotateImageRequest
- fromVisionParagraph
- fromVisionWord
- isBreakType
- isPage
- isPages
- isParagraph
- isParagraphsById
- isTextAnnotation
- isWord
- isWordArray
- isWordsById
Type aliases
BreakType
Ƭ BreakType: "UNKNOWN" | "SPACE" | "SURE_SPACE" | "EOL_SURE_SPACE" | "HYPHEN" | "LINE_BREAK"
Defined in src/TextAnnotation.ts:33
ParagraphsById
Ƭ ParagraphsById: Dictionary‹Paragraph›
Defined in src/TextAnnotation.ts:67
WordsById
Ƭ WordsById: Dictionary‹Word›
Defined in src/TextAnnotation.ts:65
Variables
Const
breakTypes
• breakTypes: BreakType[] = [ 'UNKNOWN', 'SPACE', 'SURE_SPACE', // Sure space (very wide) 'EOL_SURE_SPACE', // Line-wrapping break 'HYPHEN', // End-line hyphen that is not present in text 'LINE_BREAK', ]
Defined in src/TextAnnotation.ts:41
Const
fromAnnotateImageResponse
• fromAnnotateImageResponse: function = pipe( Vision.getPagesFromAnnotateImageResponse, map(fromVisionPage), A.array.sequence(IO.io) )
Defined in src/TextAnnotation.ts:287
fromAnnotateImageResponse :: AnnotateImageResponse -> IO [Page]
Type declaration:
▸ (response
: AnnotateImageResponse): IO‹Page[]›
Parameters:
Name | Type |
---|---|
response |
AnnotateImageResponse |
Const
fromVisionPage
• fromVisionPage: function = pipe( Vision.getParagraphsFromPage, map(fromVisionParagraph), A.array.sequence(IO.io), IO.map( reduce((acc: Page, page: Page) => mergeDeepLeft(acc, page) as Page, { wordsById: {}, paragraphsById: {}, }) ) )
Defined in src/TextAnnotation.ts:270
fromVisionPage :: VisionPage -> IO Page
Type declaration:
Parameters:
Name | Type |
---|---|
page |
Page |
Const
getBreakTypeFromSymbols
• getBreakTypeFromSymbols: function = pipe( last, path(['property', 'detectedBreak', 'type']), O.fromPredicate(isBreakType), O.getOrElse(() => 'UNKNOWN') )
Defined in src/TextAnnotation.ts:179
getBreakTypeFromSymbols :: [VisionSymbol] -> DetectedBreak
Type declaration:
▸ (symbols
: TextSymbol[]): BreakType
Parameters:
Name | Type |
---|---|
symbols |
TextSymbol[] |
Const
getStringFromBreakType
• getStringFromBreakType: function = prop( __, breakTypeMappings )
Defined in src/TextAnnotation.ts:331
getStringFromBreakType :: BreakType -> String
Type declaration:
▸ (breakType
: BreakType): string
Parameters:
Name | Type |
---|---|
breakType |
BreakType |
Const
getTextFromWords
• getTextFromWords: function = pipe( reduce( (acc: string, word: Word) => acc + word.text + getStringFromBreakType(word.breakType), '' ), replace(/\n$/, ''), trim )
Defined in src/TextAnnotation.ts:341
getTextFromWords :: [Word] -> String
Type declaration:
▸ (words
: Word[]): string
Parameters:
Name | Type |
---|---|
words |
Word[] |
Functions
Const
fromAnnotateImageRequest
▸ fromAnnotateImageRequest(request
: AsyncAnnotateFileRequest): (Anonymous function)
Defined in src/TextAnnotation.ts:302
fromAnnotateImageRequest :: AsyncAnnotateFileRequest -> IO [Page]
Parameters:
Name | Type |
---|---|
request |
AsyncAnnotateFileRequest |
Returns: (Anonymous function)
Const
fromVisionParagraph
▸ fromVisionParagraph(visionParagraph
: Paragraph): (Anonymous function)
Defined in src/TextAnnotation.ts:233
fromVisionParagraph :: VisionParagraph -> IO Page
Parameters:
Name | Type |
---|---|
visionParagraph |
Paragraph |
Returns: (Anonymous function)
Const
fromVisionWord
▸ fromVisionWord(word
: Word): (Anonymous function)
Defined in src/TextAnnotation.ts:214
fromVisionWord :: VisionWord -> Word
Parameters:
Name | Type |
---|---|
word |
Word |
Returns: (Anonymous function)
Const
isBreakType
▸ isBreakType(a
: unknown): a is BreakType
Defined in src/TextAnnotation.ts:87
isBreakType :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is BreakType
Const
isPage
▸ isPage(a
: unknown): a is Page
Defined in src/TextAnnotation.ts:146
isPage :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Page
Const
isPages
▸ isPages(a
: unknown): a is Page
Defined in src/TextAnnotation.ts:157
isPages :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Page
Const
isParagraph
▸ isParagraph(a
: unknown): a is Paragraph
Defined in src/TextAnnotation.ts:118
isParagraph :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Paragraph
Const
isParagraphsById
▸ isParagraphsById(a
: unknown): a is ParagraphsById
Defined in src/TextAnnotation.ts:138
isWordsById :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is ParagraphsById
Const
isTextAnnotation
▸ isTextAnnotation(a
: unknown): a is TextAnnotation
Defined in src/TextAnnotation.ts:165
isTextAnnotation :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is TextAnnotation
Const
isWord
▸ isWord(a
: unknown): a is Word
Defined in src/TextAnnotation.ts:95
isWord :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Word
Const
isWordArray
▸ isWordArray(a
: unknown): a is Word[]
Defined in src/TextAnnotation.ts:110
isWordArray :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Word[]
Const
isWordsById
▸ isWordsById(a
: unknown): a is WordsById
Defined in src/TextAnnotation.ts:130
isWordsById :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is WordsById
Module: "Types"
Index
Variables
Functions
Variables
Const
isNotNil
• isNotNil: function = pipe(isNil, not)
Defined in src/Types.ts:33
isNotNil :: a -> bool
Type declaration:
▸ (a
: unknown): boolean
Parameters:
Name | Type |
---|---|
a |
unknown |
Functions
Const
isArray
▸ isArray(a
: unknown): a is unknown[]
Defined in src/Types.ts:69
isArray :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is unknown[]
Const
isDictionary
▸ isDictionary(a
: unknown): a is Dictionary
Defined in src/Types.ts:76
isDictionary :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Dictionary
Const
isNat
▸ isNat(a
: unknown): a is number
Defined in src/Types.ts:54
isNat :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is number
Const
isNumber
▸ isNumber(a
: unknown): a is number
Defined in src/Types.ts:47
isNumber :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is number
Const
isRegExp
▸ isRegExp(a
: unknown): a is RegExp
Defined in src/Types.ts:40
isRegExp :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is RegExp
Const
isString
▸ isString(a
: unknown): a is string
Defined in src/Types.ts:62
isString :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is string
Const
propSatisfiesIfExists
▸ propSatisfiesIfExists(pred
: function, name
: string): function
Defined in src/Types.ts:25
propSatisfiesIfExists :: (Pred, String) -> Reader a bool
Parameters:
▪ pred: function
▸ (a
: unknown): boolean
Parameters:
Name | Type |
---|---|
a |
unknown |
▪ name: string
Returns: function
▸ (...a
: keyof A[]): boolean
Parameters:
Name | Type |
---|---|
...a |
keyof A[] |
functional-types › "Vertex/Arbitraries"
Module: "Vertex/Arbitraries"
Index
Functions
Functions
Const
boundingBox
▸ boundingBox(): Arbitrary‹BoundingBox›
Defined in src/Vertex/Arbitraries.ts:38
Returns: Arbitrary‹BoundingBox›
Const
overlaps
▸ overlaps(): Arbitrary‹[Poly, Poly]›
Defined in src/Vertex/Arbitraries.ts:31
Returns: Arbitrary‹[Poly, Poly]›
Const
poly
▸ poly(): Arbitrary‹Poly›
Defined in src/Vertex/Arbitraries.ts:21
Returns: Arbitrary‹Poly›
Const
separates
▸ separates(): Arbitrary‹[Poly, Poly]›
Defined in src/Vertex/Arbitraries.ts:24
Returns: Arbitrary‹[Poly, Poly]›
Const
vertex
▸ vertex(): Arbitrary‹Vertex›
Defined in src/Vertex/Arbitraries.ts:15
Returns: Arbitrary‹Vertex›
Const
withHeaderArguments
▸ withHeaderArguments(): Arbitrary‹object›
Defined in src/Vertex/Arbitraries.ts:50
Returns: Arbitrary‹object›
functional-types › "Vertex/index"
Module: "Vertex/index"
Index
Interfaces
Type aliases
Variables
- areaOf
- getBottomLeft
- getBottomRight
- getCornersFromPoly
- getTopLeft
- getTopRight
- getX
- getXs
- getY
- getYs
- heightOf
- unionOf
- widthOf
Functions
- append
- containedBy
- contains
- getChildlessBoundingBoxes
- hasColumns
- hasHeader
- hasHeaderColumn
- hasHeaderRow
- hasHeaders
- hasRows
- hasRowsOrColumns
- intersects
- isBoundingBox
- isLabeledBoundingBox
- isLine
- isPoly
- isVertex
- lengthOf
- makeBoundingBox
- makeLabeledBoundingBox
- makeLine
- makePoly
- makeVertex
- ratioContainedBy
- ratioContaining
- sortPoly
- splitByXs
- splitByYs
- toPoly
- toRectangle
- unions
- withHeader
- withHeaderColumn
- withHeaderRow
Type aliases
Line
Defined in src/Vertex/index.ts:50
Poly
Ƭ Poly: [Vertex, Vertex, Vertex, Vertex]
Defined in src/Vertex/index.ts:55
[TopLeft, TopRight, BottomLeft, BottomRight]
WithColumns
Ƭ WithColumns: A & object
Defined in src/Vertex/index.ts:67
WithHeader
Ƭ WithHeader: WithHeaderRow‹A› | WithHeaderColumn‹A›
Defined in src/Vertex/index.ts:79
WithHeaderColumn
Ƭ WithHeaderColumn: A & object
Defined in src/Vertex/index.ts:75
WithHeaderRow
Ƭ WithHeaderRow: A & object
Defined in src/Vertex/index.ts:71
WithHeaders
Ƭ WithHeaders: WithHeaderRow‹A› & WithHeaderColumn‹A›
Defined in src/Vertex/index.ts:83
WithRows
Ƭ WithRows: A & object
Defined in src/Vertex/index.ts:63
Variables
Const
areaOf
• areaOf: function = converge(multiply, [ widthOf, heightOf, ])
Defined in src/Vertex/index.ts:601
areaOf :: Poly -> Float
Type declaration:
▸ (poly
: Poly): number
Parameters:
Name | Type |
---|---|
poly |
Poly |
Const
getBottomLeft
• getBottomLeft: function = nth(2)
Defined in src/Vertex/index.ts:475
getBottomLeft :: Poly -> Vertex
Type declaration:
Parameters:
Name | Type |
---|---|
poly |
Poly |
Const
getBottomRight
• getBottomRight: function = nth(3)
Defined in src/Vertex/index.ts:482
getBottomRight :: Poly -> Vertex
Type declaration:
Parameters:
Name | Type |
---|---|
poly |
Poly |
Const
getCornersFromPoly
• getCornersFromPoly: function = applySpec({ start: head, end: last, }) as R.Reader<Poly, Corners>
Defined in src/Vertex/index.ts:324
getCornersFromPoly :: Poly -> Corners
Type declaration:
Parameters:
Name | Type |
---|---|
poly |
Poly |
Const
getTopLeft
• getTopLeft: function = nth(0)
Defined in src/Vertex/index.ts:461
getTopLeft :: Poly -> Vertex
Type declaration:
Parameters:
Name | Type |
---|---|
poly |
Poly |
Const
getTopRight
• getTopRight: function = nth(1)
Defined in src/Vertex/index.ts:468
getTopRight :: Poly -> Vertex
Type declaration:
Parameters:
Name | Type |
---|---|
poly |
Poly |
Const
getX
• getX: function = pipe(head, prop<'x', number>('x'))
Defined in src/Vertex/index.ts:392
getX :: Line -> Float
Type declaration:
▸ (line
: Line): number
Parameters:
Name | Type |
---|---|
line |
Line |
Const
getXs
• getXs: function = map(getX)
Defined in src/Vertex/index.ts:406
getXs :: [Line] -> [Float]
Type declaration:
▸ (lines
: Line[]): number[]
Parameters:
Name | Type |
---|---|
lines |
Line[] |
Const
getY
• getY: function = pipe(head, prop<'y', number>('y'))
Defined in src/Vertex/index.ts:385
getY :: Line -> Float
Type declaration:
▸ (line
: Line): number
Parameters:
Name | Type |
---|---|
line |
Line |
Const
getYs
• getYs: function = map(getY)
Defined in src/Vertex/index.ts:399
getYs :: [Line] -> [Float]
Type declaration:
▸ (lines
: Line[]): number[]
Parameters:
Name | Type |
---|---|
lines |
Line[] |
Const
heightOf
• heightOf: function = converge(subtract, [ pipe(getBottomLeft, prop('y')), pipe(getTopLeft, prop('y')), ])
Defined in src/Vertex/index.ts:591
heightOf :: Poly -> Float
Type declaration:
▸ (poly
: Poly): number
Parameters:
Name | Type |
---|---|
poly |
Poly |
Const
unionOf
• unionOf: function = converge( reduce((acc: Poly, value: Poly) => unions(acc)(value)), [head, tail] )
Defined in src/Vertex/index.ts:694
unionOf :: [Poly] -> Poly
Type declaration:
Parameters:
Name | Type |
---|---|
polygons |
Poly[] |
Const
widthOf
• widthOf: function = converge(subtract, [ pipe(getTopRight, prop('x')), pipe(getTopLeft, prop('x')), ])
Defined in src/Vertex/index.ts:581
widthOf :: Poly -> Float
Type declaration:
▸ (poly
: Poly): number
Parameters:
Name | Type |
---|---|
poly |
Poly |
Functions
Const
append
▸ append<**A**>(boundingBox
: A): (Anonymous function)
Defined in src/Vertex/index.ts:444
append :: BoundingBox -> ([Float], [Float]) -> BoundingBox
Type parameters:
▪ A: BoundingBox
Parameters:
Name | Type |
---|---|
boundingBox |
A |
Returns: (Anonymous function)
Const
containedBy
▸ containedBy(poly
: [Vertex, Vertex, Vertex, Vertex], threshold
: number): Reader‹[Vertex, Vertex, Vertex, Vertex], boolean›
Defined in src/Vertex/index.ts:732
containedBy :: Poly -> Reader Poly bool
Parameters:
Name | Type | Default |
---|---|---|
poly |
[Vertex, Vertex, Vertex, Vertex] | - |
threshold |
number | 0.9 |
Returns: Reader‹[Vertex, Vertex, Vertex, Vertex], boolean›
Const
contains
▸ contains(poly
: [Vertex, Vertex, Vertex, Vertex], threshold
: number): Reader‹[Vertex, Vertex, Vertex, Vertex], boolean›
Defined in src/Vertex/index.ts:743
contains :: Poly -> Reader Poly bool
Parameters:
Name | Type | Default |
---|---|---|
poly |
[Vertex, Vertex, Vertex, Vertex] | - |
threshold |
number | 0.9 |
Returns: Reader‹[Vertex, Vertex, Vertex, Vertex], boolean›
Const
getChildlessBoundingBoxes
▸ getChildlessBoundingBoxes(boundingBoxes
: LabeledBoundingBox[]): any[]
Defined in src/Vertex/index.ts:787
getChildlessBoundingBoxes :: [BoundingBox] -> [BoundingBox]
Parameters:
Name | Type |
---|---|
boundingBoxes |
LabeledBoundingBox[] |
Returns: any[]
Const
hasColumns
▸ hasColumns<**A**>(a
: A): a is WithColumns
Defined in src/Vertex/index.ts:176
hasColumns :: a -> bool
Type parameters:
▪ A: BoundingBox
Parameters:
Name | Type |
---|---|
a |
A |
Const
hasHeader
▸ hasHeader<**A**>(a
: A): a is WithHeader
Defined in src/Vertex/index.ts:211
hasHeader :: a -> bool
Type parameters:
▪ A: BoundingBox
Parameters:
Name | Type |
---|---|
a |
A |
Const
hasHeaderColumn
▸ hasHeaderColumn<**A**>(a
: A): a is WithHeaderColumn
Defined in src/Vertex/index.ts:202
hasHeaderColumn :: a -> bool
Type parameters:
▪ A: BoundingBox
Parameters:
Name | Type |
---|---|
a |
A |
Returns: a is WithHeaderColumn
Const
hasHeaderRow
▸ hasHeaderRow<**A**>(a
: A): a is WithHeaderRow
Defined in src/Vertex/index.ts:193
hasHeaderRow :: a -> bool
Type parameters:
▪ A: BoundingBox
Parameters:
Name | Type |
---|---|
a |
A |
Const
hasHeaders
▸ hasHeaders<**A**>(a
: A): a is WithHeaders
Defined in src/Vertex/index.ts:219
hasHeaders :: a -> bool
Type parameters:
▪ A: BoundingBox
Parameters:
Name | Type |
---|---|
a |
A |
Const
hasRows
▸ hasRows<**A**>(a
: A): a is WithRows
Defined in src/Vertex/index.ts:168
hasRows :: a -> bool
Type parameters:
▪ A: BoundingBox
Parameters:
Name | Type |
---|---|
a |
A |
Const
hasRowsOrColumns
▸ hasRowsOrColumns<**A**>(a
: A): a is WithRows | WithColumns
Defined in src/Vertex/index.ts:184
hasRowsOrColumns :: a -> bool
Type parameters:
▪ A: BoundingBox
Parameters:
Name | Type |
---|---|
a |
A |
Returns: a is WithRows | WithColumns
Const
intersects
▸ intersects(p0
: Poly): (Anonymous function)
Defined in src/Vertex/index.ts:646
intersects :: Poly -> Reader Poly (Option Poly)
Parameters:
Name | Type |
---|---|
p0 |
Poly |
Returns: (Anonymous function)
Const
isBoundingBox
▸ isBoundingBox(a
: unknown): a is BoundingBox
Defined in src/Vertex/index.ts:156
isBoundingBox :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is BoundingBox
Const
isLabeledBoundingBox
▸ isLabeledBoundingBox(a
: unknown): a is LabeledBoundingBox
Defined in src/Vertex/index.ts:413
isLabeledBoundingBox :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is LabeledBoundingBox
Const
isLine
▸ isLine(a
: unknown): a is Line
Defined in src/Vertex/index.ts:116
isLine :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Line
Const
isPoly
▸ isPoly(a
: unknown): a is Poly
Defined in src/Vertex/index.ts:128
isPoly :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Poly
Const
isVertex
▸ isVertex(a
: unknown): a is Vertex
Defined in src/Vertex/index.ts:108
isVertex :: a -> bool
Parameters:
Name | Type |
---|---|
a |
unknown |
Returns: a is Vertex
Const
lengthOf
▸ lengthOf(__namedParameters
: [any, any]): number
Defined in src/Vertex/index.ts:611
lengthOf :: Line -> Float
Parameters:
Name | Type |
---|---|
__namedParameters |
[any, any] |
Returns: number
Const
makeBoundingBox
▸ makeBoundingBox(poly
: Poly, ys
: number[], xs
: number[]): BoundingBox
Defined in src/Vertex/index.ts:366
makeBoundingBox :: (Poly, [Float], [Float]) -> BoundingBox
Parameters:
Name | Type |
---|---|
poly |
Poly |
ys |
number[] |
xs |
number[] |
Returns: BoundingBox
Const
makeLabeledBoundingBox
▸ makeLabeledBoundingBox(id
: string, label
: string, poly
: Poly, ys
: number[], xs
: number[]): LabeledBoundingBox
Defined in src/Vertex/index.ts:421
makeLabeledBoundingBox :: (String, String, Poly, [Float], [Float]) -> LabeledBoundingBox
Parameters:
Name | Type |
---|---|
id |
string |
label |
string |
poly |
Poly |
ys |
number[] |
xs |
number[] |
Returns: LabeledBoundingBox
Const
makeLine
▸ makeLine(x0
: number, y0
: number, x1
: number, y1
: number): Line
Defined in src/Vertex/index.ts:234
makeVertex :: (Float, Float, Float, Float) -> Line
Parameters:
Name | Type |
---|---|
x0 |
number |
y0 |
number |
x1 |
number |
y1 |
number |
Returns: Line
Const
makePoly
▸ makePoly(...coords
: [number, number, number, number]): Poly
Defined in src/Vertex/index.ts:299
makePoly :: (Float, Float, Float, Float) -> Poly
Parameters:
Name | Type |
---|---|
...coords |
[number, number, number, number] |
Returns: Poly
Const
makeVertex
▸ makeVertex(x
: number, y
: number): Vertex
Defined in src/Vertex/index.ts:227
makeVertex :: (Float, Float) -> Vertex
Parameters:
Name | Type |
---|---|
x |
number |
y |
number |
Returns: Vertex
Const
ratioContainedBy
▸ ratioContainedBy(p0
: Poly): function
Defined in src/Vertex/index.ts:704
ratioContainedBy :: Poly -> Reader Poly Float
Parameters:
Name | Type |
---|---|
p0 |
Poly |
Returns: function
▸ (...a
: keyof any[]): any
Parameters:
Name | Type |
---|---|
...a |
keyof any[] |
Const
ratioContaining
▸ ratioContaining(p0
: Poly): (Anonymous function)
Defined in src/Vertex/index.ts:720
ratioContaining :: Poly -> Reader Poly Float
Parameters:
Name | Type |
---|---|
p0 |
Poly |
Returns: (Anonymous function)
Const
sortPoly
▸ sortPoly(__namedParameters
: [Vertex, Vertex, Vertex]): [Vertex, Vertex, Vertex, Vertex]
Defined in src/Vertex/index.ts:311
sortPoly :: Poly -> Poly
Parameters:
Name | Type |
---|---|
__namedParameters |
[Vertex, Vertex, Vertex] |
Returns: [Vertex, Vertex, Vertex, Vertex]
Const
splitByXs
▸ splitByXs(xs
: number[]): (Anonymous function)
Defined in src/Vertex/index.ts:768
splitByXs :: [number] -> Reader Poly [Poly]
Parameters:
Name | Type |
---|---|
xs |
number[] |
Returns: (Anonymous function)
Const
splitByYs
▸ splitByYs(ys
: number[]): (Anonymous function)
Defined in src/Vertex/index.ts:751
splitByYs :: [number] -> Reader Poly [Poly]
Parameters:
Name | Type |
---|---|
ys |
number[] |
Returns: (Anonymous function)
Const
toPoly
▸ toPoly(__namedParameters
: object): [Vertex, Vertex, Vertex, Vertex]
Defined in src/Vertex/index.ts:638
toPoly :: Rectangle -> Poly
Parameters:
▪ __namedParameters: object
Name | Type |
---|---|
x0 |
number |
x1 |
number |
y0 |
number |
y1 |
number |
Returns: [Vertex, Vertex, Vertex, Vertex]
Const
toRectangle
▸ toRectangle(__namedParameters
: [Vertex, Vertex, Vertex, Vertex]): object
Defined in src/Vertex/index.ts:621
toRectangle :: Poly -> Rectangle
Parameters:
Name | Type |
---|---|
__namedParameters |
[Vertex, Vertex, Vertex, Vertex] |
Returns: object
x0: number = topLeft.x
x1: number = bottomRight.x
y0: number = topRight.y
y1: number = bottomLeft.y
Const
unions
▸ unions(p0
: Poly): (Anonymous function)
Defined in src/Vertex/index.ts:672
unions :: Poly -> Reader Poly Poly
Parameters:
Name | Type |
---|---|
p0 |
Poly |
Returns: (Anonymous function)
Const
withHeader
▸ withHeader(vertex
: Vertex): (Anonymous function)
Defined in src/Vertex/index.ts:566
withHeader :: Vertex -> ReaderEither BoundingBox (WithHeader BoundingBox) BoundingBox
Parameters:
Name | Type |
---|---|
vertex |
Vertex |
Returns: (Anonymous function)
Const
withHeaderColumn
▸ withHeaderColumn(x
: number): (Anonymous function)
Defined in src/Vertex/index.ts:529
withHeaderColumn :: Float -> ReaderEither BoundingBox BoundingBox (WithHeaderColumn BoundingBox)
Parameters:
Name | Type |
---|---|
x |
number |
Returns: (Anonymous function)
Const
withHeaderRow
▸ withHeaderRow(y
: number): (Anonymous function)
Defined in src/Vertex/index.ts:491
withHeaderRow :: Float -> ReaderEither BoundingBox BoundingBox (WithHeaderRow BoundingBox)
Parameters:
Name | Type |
---|---|
y |
number |
Returns: (Anonymous function)
Module: "Vision"
Index
Interfaces
- AnnotateImageRequest
- AnnotateImageResponse
- AsyncAnnotateFileRequest
- Block
- BoundingPoly
- DetectedBreak
- DetectedLanguage
- EntityAnnotation
- Feature
- GcsDestination
- GcsSource
- Image
- ImageContext
- ImageSource
- InputConfig
- LatLng
- LocationInfo
- NormalizedVertex
- OutputConfig
- Page
- Paragraph
- Property
- TextAnnotation
- TextProperty
- TextSymbol
- Vertex
- Word
Type aliases
Variables
- getBlocksFromPage
- getFileIdFromAnnotateImageRequest
- getPagesFromAnnotateImageRequest
- getPagesFromAnnotateImageResponse
- getParagraphsFromBlock
- getParagraphsFromPage
- getSymbolsFromWord
- getTextFromSymbol
- getTextFromWord
- getWordsFromPage
- getWordsFromParagraph
Type aliases
BlockType
Ƭ BlockType: "UNKNOWN" | "TEXT" | "TABLE" | "PICTURE" | "RULER" | "BARCODE" | string
Defined in src/Vision.ts:163
BreakType
Ƭ BreakType: "UNKNOWN" | "SPACE" | "SURE_SPACE" | "EOL_SURE_SPACE" | "HYPHEN" | "LINE_BREAK"
Defined in src/Vision.ts:202
Type
Ƭ Type: string
Defined in src/Vision.ts:82
Variables
Const
getBlocksFromPage
• getBlocksFromPage: function = R.prop('blocks')
Defined in src/Vision.ts:305
getBlocksFromPage :: Page -> [Block]
Type declaration:
Parameters:
Name | Type |
---|---|
page |
Page |
Const
getFileIdFromAnnotateImageRequest
• getFileIdFromAnnotateImageRequest: function = pipe(
path
Defined in src/Vision.ts:360
getFileIdFromAnnotateImageRequest :: AnnotateImageRequest -> String
Type declaration:
▸ (request
: AsyncAnnotateFileRequest): string
Parameters:
Name | Type |
---|---|
request |
AsyncAnnotateFileRequest |
Const
getPagesFromAnnotateImageRequest
• getPagesFromAnnotateImageRequest: function = pipe( prop('responses') as ( request: AsyncAnnotateFileRequest ) => AsyncAnnotateFileRequest['responses'], defaultTo([]), map(getPagesFromAnnotateImageResponse), unnest )
Defined in src/Vision.ts:344
getPagesFromAnnotateImageRequest :: AnnotateImageRequest -> [Page]
Type declaration:
▸ (request
: AsyncAnnotateFileRequest): Page[]
Parameters:
Name | Type |
---|---|
request |
AsyncAnnotateFileRequest |
Const
getPagesFromAnnotateImageResponse
• getPagesFromAnnotateImageResponse: function = pipe( path(['fullTextAnnotation', 'pages']), defaultTo([]) as (pages: Page[] | undefined) => Page[] )
Defined in src/Vision.ts:332
getPagesFromAnnotateImageResponse :: AnnotateImageResponse -> [Page]
Type declaration:
▸ (response
: AnnotateImageResponse): Page[]
Parameters:
Name | Type |
---|---|
response |
AnnotateImageResponse |
Const
getParagraphsFromBlock
• getParagraphsFromBlock: function = R.prop( 'paragraphs' )
Defined in src/Vision.ts:296
getParagraphsFromBlock :: Block -> [Paragraph]
Type declaration:
Parameters:
Name | Type |
---|---|
block |
Block |
Const
getParagraphsFromPage
• getParagraphsFromPage: function = R.pipe( getBlocksFromPage, R.chain(getParagraphsFromBlock) )
Defined in src/Vision.ts:312
getParagraphsFromPage :: Page -> [Paragraph]
Type declaration:
Parameters:
Name | Type |
---|---|
page |
Page |
Const
getSymbolsFromWord
• getSymbolsFromWord: function = R.prop( 'symbols' )
Defined in src/Vision.ts:267
getSymbolsFromWord :: Word -> [TextSymbol]
Type declaration:
▸ (word
: Word): TextSymbol[]
Parameters:
Name | Type |
---|---|
word |
Word |
Const
getTextFromSymbol
• getTextFromSymbol: function = R.prop('text')
Defined in src/Vision.ts:260
getTextFromSymbol :: TextSymbol -> String
Type declaration:
▸ (symbol
: TextSymbol): string
Parameters:
Name | Type |
---|---|
symbol |
TextSymbol |
Const
getTextFromWord
• getTextFromWord: function = R.pipe( getSymbolsFromWord, R.map(getTextFromSymbol), R.join('') )
Defined in src/Vision.ts:276
getTextFromWord :: Word -> String
Type declaration:
▸ (word
: Word): string
Parameters:
Name | Type |
---|---|
word |
Word |
Const
getWordsFromPage
• getWordsFromPage: function = R.pipe( getParagraphsFromPage, R.chain(getWordsFromParagraph) )
Defined in src/Vision.ts:322
getWordsFromPage :: Page -> [Word]
Type declaration:
Parameters:
Name | Type |
---|---|
page |
Page |
Const
getWordsFromParagraph
• getWordsFromParagraph: function = R.prop( 'words' )
Defined in src/Vision.ts:287
getWordsFromParagraph :: Paragraph -> [Word]
Type declaration:
▸ (paragraph
: Paragraph): Word[]
Parameters:
Name | Type |
---|---|
paragraph |
Paragraph |