essence v0.1.0 Essence.Document

This module defines the struct type Essence.Document, as well as a variety of convenience methods for access the document’s text, paragraphs, sentences and tokens.

Summary

Functions

Retrieve the list of all tokens contained in the given Essence.Document

Read the text represented by a String and create an Essence.Document

Retrieve a the n-th tokenized paragraph from the given Essence.Document

Retrieve the tokenized paragraphs from the given Essence.Document

Retrieve the n-th tokenized sentence from the given Essence.Document

Retrieve the tokenized sentences from the given Essence.Document

Functions

enumerate_tokens(document)

Specs

enumerate_tokens(document :: %Essence.Document{meta: term, nested_tokens: term, text: term, type: term, uri: term}) :: List.t

Retrieve the list of all tokens contained in the given Essence.Document

from_text(text)

Specs

from_text(text :: String.t) :: %Essence.Document{meta: term, nested_tokens: term, text: term, type: term, uri: term}

Read the text represented by a String and create an Essence.Document.

paragraph(document, n)

Specs

paragraph(document :: %Essence.Document{meta: term, nested_tokens: term, text: term, type: term, uri: term}, n :: integer) :: List.t

Retrieve a the n-th tokenized paragraph from the given Essence.Document

paragraphs(document)

Specs

paragraphs(document :: %Essence.Document{meta: term, nested_tokens: term, text: term, type: term, uri: term}) :: List.t

Retrieve the tokenized paragraphs from the given Essence.Document.

sentence(document, n)

Specs

sentence(document :: %Essence.Document{meta: term, nested_tokens: term, text: term, type: term, uri: term}, n :: integer) :: List.t

Retrieve the n-th tokenized sentence from the given Essence.Document

sentences(document)

Specs

sentences(document :: %Essence.Document{meta: term, nested_tokens: term, text: term, type: term, uri: term}) :: List.t

Retrieve the tokenized sentences from the given Essence.Document.