biblexmlconverter
Convert bible xml files to the Giella xml format.
convert2intermediate(filename)
Convert the bible xml to intermediate Giella xml format.
Source code in /home/anders/projects/CorpusTools/corpustools/biblexmlconverter.py
194 195 196 197 198 199 200 |
|
make_p(verses)
Convert verse strings to p element.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
verses |
list[str]
|
a list of strings |
required |
Returns:
Type | Description |
---|---|
lxml.etree.Element
|
a Giella xml p element |
Source code in /home/anders/projects/CorpusTools/corpustools/biblexmlconverter.py
98 99 100 101 102 103 104 105 106 107 108 109 110 |
|
process_bible(bible_doc)
Convert a bible xml document to a Giella xml document.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
bible_doc |
etree.Element
|
the bible xml tree |
required |
Returns:
Type | Description |
---|---|
lxml.etree.Element
|
a Giella xml body element. |
Source code in /home/anders/projects/CorpusTools/corpustools/biblexmlconverter.py
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 |
|
process_book(book_element)
Convert a bible xml book to a Giella xml section one.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
book_element |
lxml.etree.Element
|
a bible xml book element |
required |
Returns:
Type | Description |
---|---|
lxml.etree.Element
|
a Giella xml section element. |
Source code in /home/anders/projects/CorpusTools/corpustools/biblexmlconverter.py
149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
|
process_chapter(chapter_element)
Convert a bible xml chapter to a Giella xml section one.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
chapter_element |
lxml.etree.Element
|
a bible xml chapter element |
required |
Returns:
Type | Description |
---|---|
lxml.etree.Element
|
a Giella xml section element. |
Source code in /home/anders/projects/CorpusTools/corpustools/biblexmlconverter.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
|
process_p(paragraph)
Convert bible xml verse elements to p elements.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
paragraph |
lxml.etree.Element
|
is a bible xml p element. |
required |
Returns:
Type | Description |
---|---|
lxml.etree.Element
|
a Giella xml p element |
Source code in /home/anders/projects/CorpusTools/corpustools/biblexmlconverter.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 |
|
process_section(section_element)
Process the section element found in the bible xml documents.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
section_element |
lxml.etree.Element
|
an etree element containing the section element found in a bible xml document. |
required |
Returns:
Name | Type | Description |
---|---|---|
section |
lxml.etree.Element
|
an etree element containing a corpus xml section. |
Source code in /home/anders/projects/CorpusTools/corpustools/biblexmlconverter.py
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
|
process_verse(verse_element)
Process the verse element found in bible xml documents.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
verse_element |
lxml.etree.Element
|
an etree element containing the verse element found in a bible xml document. |
required |
Returns:
Type | Description |
---|---|
str
|
A string containing the text of the verse element. |
Source code in /home/anders/projects/CorpusTools/corpustools/biblexmlconverter.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
|