Skip to content

Commit

Permalink
Terminate with closing tags
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysonvirissimo committed Apr 28, 2024
1 parent 5d3b88f commit a4bc879
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion lexicons/Latin00.pls
Original file line number Diff line number Diff line change
Expand Up @@ -1796,4 +1796,4 @@
<grapheme>pedis</grapheme>
<phoneme>pɛdɪs</phoneme>
</lexeme>
<lexicon/>
</lexicon>
2 changes: 1 addition & 1 deletion lexicons/Latin01.pls
Original file line number Diff line number Diff line change
Expand Up @@ -1891,4 +1891,4 @@
<grapheme>parcere</grapheme>
<phoneme>parkɛre</phoneme>
</lexeme>
<lexicon/>
</lexicon>
2 changes: 1 addition & 1 deletion lexicons/Latin02.pls
Original file line number Diff line number Diff line change
Expand Up @@ -1851,4 +1851,4 @@
<grapheme>desitum</grapheme>
<phoneme>desitumː</phoneme>
</lexeme>
<lexicon/>
</lexicon>
2 changes: 1 addition & 1 deletion lexicons/Latin03.pls
Original file line number Diff line number Diff line change
Expand Up @@ -1888,4 +1888,4 @@
<grapheme>insulto</grapheme>
<phoneme>inˈsul.to</phoneme>
</lexeme>
<lexicon/>
</lexicon>
2 changes: 1 addition & 1 deletion lexicons/Latin04.pls
Original file line number Diff line number Diff line change
Expand Up @@ -192,4 +192,4 @@
<grapheme>vulnero</grapheme>
<phoneme>ˈvul.ne.ro</phoneme>
</lexeme>
<lexicon/>
</lexicon>
6 changes: 3 additions & 3 deletions lib/medieval_latina/lexicon_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class MedievalLatina
class LexiconBuilder
MAX_SIZE = 39000 # Character limit for each PLS file
MAX_SIZE = 39000 # True limit is 40,000 characters.

def self.write
new.call
Expand All @@ -25,7 +25,7 @@ def call
xml.lexicon(xmlns: URL, version: "1.0") do
grouped_hash.each do |phonetics, words|
if xml.target!.length > MAX_SIZE
xml.lexicon # Close the current lexicon tag
xml << "</lexicon>\n" # Close the current lexicon tag with newline
write_file(xml.target!, file_index)
file_index += 1
xml = Builder::XmlMarkup.new(indent: 2) # Reset XML builder
Expand All @@ -37,7 +37,7 @@ def call
xml.phoneme phonetics
end
end
xml.lexicon # Close the final lexicon tag
xml << "</lexicon>\n" # Close the final lexicon tag with newline
end
write_file(xml.target!, file_index) # Write the last file
end
Expand Down

0 comments on commit a4bc879

Please sign in to comment.