changeset 28:3442b8700da7

Comments.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 25 May 2021 11:42:44 +0300
parents d77ab8a300b1
children f91ef7d7615b
files lxmldump.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lxmldump.py	Tue May 25 11:40:54 2021 +0300
+++ b/lxmldump.py	Tue May 25 11:42:44 2021 +0300
@@ -38,6 +38,7 @@
 }
 
 
+# List of words in kks1/ useful for debugging, option -p
 pkk_debug_list = [
     "ahas",
     "ahavakkaine",
@@ -88,7 +89,7 @@
     sys.exit(1)
 
 
-## Annotate string
+## Annotate given string with prefix and suffix based on tag
 def pkk_str_annotate(mtag, mstr):
     if pkk_cfg.annotate and mtag in pkk_element_annotation_map:
         if pkk_cfg.mode in pkk_element_annotation_map[mtag]:
@@ -106,7 +107,7 @@
     return re.sub(r'[\n\r\t]', '', mstr)
 
 
-## Format "Ptr" node as text
+## Format a "Ptr" node as text
 def pkk_ptr_to_text(pnode):
     phref = pnode.attrib["{http://www.w3.org/TR/xlink}href"]
     ptext = ("".join(pnode.itertext())).strip()