gargantext-0.0.7.1.5.3: Search, map, share
Copyright(c) CNRS 2017-Present
LicenseAGPL + CECILL v3
Maintainerteam@gargantext.org
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe-Inferred
LanguageHaskell2010

Gargantext.Core.Text.Context

Description

Context of text management tool, here are logic of main types:

  • Term
  • Multi-term
  • Label
  • Sentence
  • Corpus

How to split contexts is describes in this module.

Synopsis

Documentation

type Term = Text #

type MultiTerm = [Term] #

type TermList = [(Label, [MultiTerm])] #

type Sentence a = [a] #

type Corpus a = [Sentence a] #

data SplitContext #

Contexts definition to build/unbuild contexts.

splitBy :: SplitContext -> Text -> [Text] #

splitBy contexts of Chars or Sentences or Paragraphs To see some examples at a higher level (sentences and paragraph), see ex_terms

>>> splitBy (Chars 0) (pack "abcde")
["a","b","c","d","e"]
>>> splitBy (Chars 1) (pack "abcde")
["ab","bc","cd","de"]
>>> splitBy (Chars 2) (pack "abcde")
["abc","bcd","cde"]