Module tff.cheatsheet
Interchange with external annotation tools
from tff.convert.addnlp import NLPipeline
NLPipeline()
-
generate plain text, feed into NLP, ingest results
XML / TEI import
from tff.convert.xml import XML
X = XML(...)
-
convert XML source to full-fledged TF dataset plus app but no docs; put in your own conversion code, if you wish; see Greek New Testament
from tff.convert.tei import TEI
T = TEI(...)
-
convert TEI source to full-fledged TF dataset plus app plus docs
WATM export
from tf.app import use
from tff.convert.watm import WATM
A = use(...) WA = WATM(A, ns, ...) WA.makeText() WA.makeAnno() WA.writeAll() WA.testAll()
-
convert TF dataset to text tokens and annotations in JSON format, for consumption by TextRepo/AnnoRepo of KNAW/HuC Digital Infrastructure. See Mondriaan Proeftuin Suriano Letters HuygensING/translatin-manif
from tff.convert.watm import WATMS
W = WATM(org, repo, backend, ns, ...) W.produce()
-
convert series of TF datasets to WATM
NLP import
in order to use this, install Spacy, see tff.tools.myspacy
from tff.convert.addnlp import addTokensAndSentences
newVersion = addTokensAndSenteces(A)
-
add NLP output from Spacy to an existing TF dataset. See the docs how this is broken down in separate steps.
Command-line tools
(these work on the command-line if TF is installed)
tff-xmlschema analysis {schema}.xsd
-
Analyses an XML schema file and extracts meaningful information for processing the XML that adheres to that schema.
tff-fromxml
-
When run in a repo it finds an XML source and converts it to TF. The resulting TF data is delivered in the repo. There is a hook to put your own conversion code in.
tff-fromtei
-
When run in a repo it finds a TEI source and converts it to TF. The resulting TF data is delivered in the repo.
tff-addnlp
-
When run in the repo of a TF dataset, it adds NLP output to it after running Spacy to get them.
Expand source code Browse git
"""
.. include:: docs/main/cheatsheet.md
"""