You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tmw-functions will be merged with the cophi-toolbox that contains functions from other projects.
For documentation purposes please expand docstrings by author and email.
If necessary enhance the function's description as well.
Conventions:
At the beginning of each file:
author = "" <-- project/s authors = "" <-- name of the developer/s email = "" <-- email of the developer version = "0.3.0" date = "2016-03-20"
For each function:
def example_function (args):
""
description ....
Args: ....
ToDo: .....
Author: ...
""
Example:
def read_tei5(teiPath, txtFolder, xpath):
"""
Extract selected text from TEI P5 files and write TXT files.
Args:
teiPath (str): Path / glob pattern of the TEI files to process.
txtFolder (str): Path to a folder where to write the text files. Will
be created if it doesn't exist yet.
xpath (str): From what should the text be extracted?
``alltext``
all text nodes, including header
``bodytext``
text nodes from the body only
``seg``
Only text that is included in ``seg`` elements
``said``
Only text that is included in ``said`` elements
Todo:
* do we need :func:`lxml.etree.strip_tags` at all? If so, make configurable & sanitize with `xpath`
option
* the :func:`lxml.etree.strip_elements` stuff should be made configurable
* filename munging should use os.path etc.
* code cleanup
* logging instead of print()
Author:
CLiGS
"""
The text was updated successfully, but these errors were encountered:
SinaB0ck
changed the title
Expand docstring for each function by author and email
Expand docstring for each function by author and email (updated 13.06.16)
Jun 13, 2016
tmw-functions will be merged with the cophi-toolbox that contains functions from other projects.
For documentation purposes please expand docstrings by author and email.
If necessary enhance the function's description as well.
Conventions:
At the beginning of each file:
author = "" <-- project/s
authors = "" <-- name of the developer/s
email = "" <-- email of the developer
version = "0.3.0"
date = "2016-03-20"
For each function:
def example_function (args):
""
description ....
""
Example:
def read_tei5(teiPath, txtFolder, xpath):
"""
Extract selected text from TEI P5 files and write TXT files.
The text was updated successfully, but these errors were encountered: