Description of work done by aec6v and ms3uf to remove entity declarations on TEI files such that they will be compatible libxml2. We will need to do work on these TEI files using Nokogiri (which is dependent on libxml2) so a global substitution is required.
#tei #xml #sed
/<!DOCTYPE/,/TEI.2/ {
/text.lib.virginia.edu\/charent/ d
/text.lib.virginia.edu\/ent/ d
}
s:Æ:\Æ:g
s:&Aacgr;:\Ά:g
s:Á:\Á:g
s:Ă:\Ă:g
s:&Acaron;:\Ǎ:g
s:Â:\Â:g
s:А:\А:g
s:&Adot;:\Ȧ:g
s:&Agr;:\Α:g
s:À:\À:g
s:Ā:\Ā:g
s:Ą:\Ą:g
s:Å:\Å:g
s:Ã:\Ã:g
s:Ä:\Ä:g
s:⌆:\⌆:g
s:Б:\Б:g
s:&Bgr;:\Β:g
s:Ч:\Ч:g
s:Ć:\Ć:g
s:⋒:\⋒:g
s:Č:\Č:g
s:Ç:\Ç:g
s:Ĉ:\Ĉ:g
s:&Cclef;:\𝄡:g
s:Ċ:\Ċ:g
s:&Ctilde;:C\̃:g
s:⋓:\⋓:g
s:Ђ:\Ђ:g
s:Ѕ:\Ѕ:g
s:Џ:\Џ:g
s:‡:\‡:g
s:Ď:\Ď:g
s:Д:\Д:g
s:Δ:\Δ:g
s:&Dgr;:\Δ:g
s:¨:\¨:g
s:⃜:\⃜:g
s:&Dstrike;:D\̴:g
s:Đ:\Đ:g
s:&EEacgr;:\Ή:g
s:&EEgr;:\Η:g
s:Ŋ:\Ŋ:g
s:Ð:\Ð:g
s:&Eacgr;:\Έ:g
s:É:\É:g
s:&Ebreve;:\Ĕ:g
s:Ě:\Ě:g
s:Ê:\Ê:g
s:Э:\Э:g
s:&Edagr;:\Ἑ:g
s:Ė:\Ė:g
s:&Egr;:\Ε:g
s:È:\È:g
s:Ē:\Ē:g
s:Ę:\Ę:g
s:Ë:\Ë:g
s:&Ezh;:\Ʒ:g
s:&Fclef8va;:\𝄣:g
s:&Fclef8vb;:\𝄤:g
s:&Fclef;:\𝄢:g
s:Ф:\Ф:g
s:&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:\▓:g
s:█:\█:g
s:⊥:\⊥:g
s:⋈:\⋈:g
s:╗:\╕:g
s:╔:\╒:g
s:╖:\╗:g
s:╓:\╓:g
s:═:\═:g
s:╦:\╥:g
s:╩:\╨:g
s:╤:\╦:g
s:╧:\╩:g
s:╝:\╛:g
s:╚:\╘:g
s:╜:\╜:g
s:╙:\╚:g
s:║:\║:g
s:╬:\╫:g
s:╣:\╢:g
s:╠:\╟:g
s:╫:\╬:g
s:╢:\╣:g
s:╟:\╠:g
s:╕:\╖:g
s:╒:\╔:g
s:┐:\┐:g
s:┌:\┌:g
s:─:\─:g
s:╥:\╤:g
s:╨:\╧:g
s:┬:\┬:g
s:┴:\┴:g
s:╛:\╝:g
s:╘:\╙:g
s:┘:\┘:g
s:└:\└:g
s:│:\│:g
s:╪:\╪:g
s:╡:\╡:g
s:╞:\╞:g
s:┼:\┼:g
s:┤:\┤:g
s:├:\├:g
s:‵:\‵:g
s:&brace;:\𝄔:g
s:&bracket;:\𝄕:g
s:&breath;:\𝄒:g
s:˘:\˘:g
s:˘:\𝅜:g
s:&brevis;:\𝆸:g
s:¦:\¦:g
s:∽:\∽:g
s:⋍:\⋍:g
s:\:\\:g
s:&bstrike;:b\̴:g
s:&btilde;:b\̃:g
s:•:\•:g
s:≎:\≎:g
s:≏:\≏:g
s:ć:\ć:g
s:&caesura;:\𝄓:g
s:∩:\∩:g
s:⁁:\⁁:g
s:ˇ:\ˇ:g
s:č:\č:g
s:ç:\ç:g
s:ĉ:\ĉ:g
s:ċ:\ċ:g
s:¸:\¸:g
s:¢:\¢:g
s:ч:\ч:g
s:✓:\✓:g
s:χ:\χ:g
s:○:\○:g
s:ˆ:\^:g
s:≗:\≗:g
s:&climacus;:\𝇗:g
s:&clivis;:\𝇕:g
s:♣:\♣:g
s:&clustb;:\𝅛:g
s:&clustw;:\𝅚:g
s:&cmacr;:c\̄:g
s:&coda;:\𝄌:g
s:::\::g
s:≔:\≔:g
s:&comLowbar;:\̳:g
s:&comacute;:\́:g
s:&combreve;:\̆:g
s:&combreveb;:\̮:g
s:&comcaron;:\̌:g
s:&comcaronb;:\̬:g
s:&comcedil;:\̧:g
s:&comcirc;:\̂:g
s:&comcircb;:\̭:g
s:&comdasia;:\̔:g
s:&comdblac;:\̋:g
s:&comdot;:\̇:g
s:&comdotb;:\̣:g
s:&comgrave;:\̀:g
s:&comibreve;:\̑:g
s:&comibreveb;:\̯:g
s:&comlowbar;:\̲:g
s:,:\,:g
s:&commacr;:\̄:g
s:&commacrb;:\̱:g
s:@:\@:g
s:&common;:\𝄴:g
s:&comogon;:\̨:g
s:&comover;:\̅:g
s:∁:\∁:g
s:∘:\∘:g
s:&compsili;:\̓:g
s:&comring;:\̊:g
s:&comringb;:\̥:g
s:&comtilde;:\̃:g
s:&comtildeb;:\̰:g
s:&comuml;:\̈:g
s:&comumlb;:\̤:g
s:&comvert;:\̍:g
s:≅:\≅:g
s:∮:\∮:g
s:∐:\∐:g
s:©:\©:g
s:℗:\℗:g
s:&cresc;:\𝆒:g
s:&croix;:\𝇏:g
s:&cross-latin;:\✝:g
s:✗:\✗:g
s:&ctilde;:c\̃:g
s:⋞:\⋞:g
s:⋟:\⋟:g
s:↶:\↶:g
s:∪:\∪:g
s:&cupre;:\≼:g
s:↷:\↷:g
s:¤:\¤:g
s:&cut;:\𝄵:g
s:⋎:\⋎:g
s:⋏:\⋏:g
s:&cxnote;:\𝅅:g
s:⇓:\⇓:g
s:&dacapo;:\𝄊:g
s:†:\†:g
s:ℸ:\ℸ:g
s:&dalsegno;:\𝄉:g
s:&damp;:\𝆴:g
s:&dampall;:\𝆵:g
s:&darr2;:\⇊:g
s:↓:\↓:g
s:‐:\‐:g
s:&dashedbar;:\𝄄:g
s:⊣:\⊣:g
s:˝:\˝:g
s:&dblbar;:\𝄁:g
s:&dblflat;:\𝄫:g
s:&dblsharp;:\𝄪:g
s:&dbltng;:\𝆊:g
s:ď:\ď:g
s:д:\д:g
s:°:\°:g
s:°macr;:\°:g
s:°slash;:\𝆩:g
s:δ:\δ:g
s:&dgr;:\δ:g
s:⇃:\⇃:g
s:⇂:\⇂:g
s:⋄:\⋄:g
s:♦:\♦:g
s:¨:\¨:g
s:&dim;:\𝆓:g
s:÷:\÷:g
s:⋇:\⋇:g
s:ђ:\ђ:g
s:&dl;:dl\͠:g
s:&dlarr;:\↙:g
s:⌞:\⌞:g
s:⌍:\⌍:g
s:&dnbow;:\𝆪:g
s:&doit;:\𝆅:g
s:$:\$:g
s:˙:\˙:g
s:˙:\𝅭:g
s:&drarr;:\↘:g
s:⌟:\⌟:g
s:⌌:\⌌:g
s:&drumclef1;:\𝄥:g
s:&drumclef2;:\𝄦:g
s:ѕ:\ѕ:g
s:&dstrike;:d\̴:g
s:đ:\đ:g
s:&dtilde;:d\̃:g
s:▿:\▿:g
s:▾:\▾:g
s:џ:\џ:g
s:≑:\≑:g
s:&eacgr;:\έ:g
s:é:\é:g
s:&ebeam;:\𝅴:g
s:&ebreve;:\ĕ:g
s:ě:\ě:g
s:&ecedil;:\ȩ:g
s:≖:\≖:g
s:ê:\ê:g
s:≕:\≕:g
s:э:\э:g
s:&edagr;:\ἑ:g
s:&edaoxgr;:\ἕ:g
s:&editorial_correction;:<correction method="tags"><p>Any corrections of printing errors are encoded with \<corr>, withthe "resp" attribute indicating responsibility for the correction, andwith the "sic" attribute providing the content in question asoriginally printed (unless the printing error being corrected is anerror of omission, in which case the "sic" attribute is notpresent).</p><p>Wholly illegible passages are encoded with an empty \<unclear/>element. Questionably legible passages are encoded with\<unclear>...\</unclear>. Omissions in the electronictranscription are encoded with \<gap/>.</p></correction>:g
s:&editorial_hyphenation;:<hyphenation eol="none"><p>Unambiguous end-of-line hyphenation has been collapsed in theelectronic text. The trailing part of the hyphenated word has beenbrought up to the preceding line, followed by the line break(\<lb/>). That is, when collapsing end-of-line hyphenation, the linebreaks from the print source have not been removed. All occurrences ofsuch collapsed hyphenation are encoded with \<regorig="ex-|ample">example\</reg>, the vertical bar representing theoriginal line break. For ambiguous end-of-line hyphenation or wordsclearly requiring a hyphen, the trailing part of the word is broughtup to the preceding line, but the hyphen is not removed\: \<regorig="twenty-|one">twenty-one\</reg>.</p></hyphenation>:g
s:&editorial_hyphenation_non-English;:<hyphenation eol="all"><p>End-of-line hyphenation has not been collapsed. It appears in theelectronic text as it is in the print source.</p></hyphenation>:g
s:&editorial_normalization;:<normalization><p>The electronic text does not contain normalizations of non-standardforms. Archaic spellings, abbreviations, etc. remain in the electronictext as they appear in the print source.</p></normalization>:g
s:&editorial_quotation;:<quotation marks="all" form="data"><p>The electronic text represents double and single quotation marksusing their standard keyboard characters (opening and closingquotation marks are not distinguished; single quotation marks andapostrophes are not distinguished). The \<q> element is not used toreplace quotation marks; \<q> is used only for block quotations (and\<quote> is not used at all). In cases where a quotation is both ablock quotation and indicated by quotation marks, both \<q> and "are used. Block quotations requiring opener and/or closer elements areencoded with \<q>\<text>\<body>\<div1 type="quotation">.</p></quotation>:g
s:&editorial_stdVals;:<stdVals><p>When dates have been encoded with \<date>, the "value" attributeis included and represents the date in "yyyy-mm-dd" format. If the dayis not known, only the year and month are provided (yyyy-mm); if themonth is not known, only the year is provided (yyyy). If the year isbefore the common era (B.C.E. or B.C.), the year is prefixed with theletter "B", for example\: \<date value="B233">233B.C.\</date>. These conventions are also used for the "from" and"to" attributes on \<dateRange>. Not all dates are encoded with\<date> or \<dateRange>.</p></stdVals>:g
s:ė:\ė:g
s:&eeacgr;:\ή:g
s:&eedagr;:\ἡ:g
s:&eegr;:\η:g
s:&eegrgr;:\ὴ:g
s:&eepegr;:\ῆ:g
s:&eepspegr;:\ἦ:g
s:≒:\≒:g
s:&egr;:\ε:g
s:è:\è:g
s:&egrgr;:\ὲ:g
s:⪖:\⋝:g
s:ℓ:\ℓ:g
s:⪕:\⋜:g
s:ē:\ē:g
s:∅:\∅:g
s: :\ :g
s: :\ :g
s: :\ :g
s:ŋ:\ŋ:g
s: :\ :g
s:ę:\ę:g
s:&ephrase;:\𝅺:g
s:&epsgr;:\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ī:g
s:&imacrgr;:\ῑ:g
s:ℑ:\ℑ:g
s:℅:\℅:g
s:∞:\∞:g
s:ı:\ı:g
s:∫:\∫:g
s:⊺:\⊺:g
s:&invturn;:\𝆘:g
s:ё:\ё:g
s:į:\į:g
s:ι:\ι:g
s:&ipegr;:\ῖ:g
s:&ipsgr;:\ἰ:g
s:&ipsoxgr;:\ἴ:g
s:¿:\¿:g
s:∈:\∊:g
s:ĩ:\ĩ:g
s:і:\і:g
s:ï:\ï:g
s:ĵ:\ĵ:g
s:й:\й:g
s:&jgr;:\ϳ:g
s:ј:\ј:g
s:є:\є:g
s:κ:\κ:g
s:ϰ:\ϰ:g
s:ķ:\ķ:g
s:к:\к:g
s:&kgr;:\κ:g
s:ĸ:\ĸ:g
s:х:\х:g
s:&khei;:\ϧ:g
s:&khgr;:\χ:g
s:ќ:\ќ:g
s:⇚:\⇚:g
s:⇐:\⇐:g
s:≦:\≦:g
s:⪋:\⋚:g
s:ĺ:\ĺ:g
s:ℒ:\ℒ:g
s:λ:\λ:g
s:⟨:\〈:g
s:⪅:\≲:g
s:«:\«:g
s:&larr2;:\⇇:g
s:←:\←:g
s:↩:\↩:g
s:↫:\↫:g
s:↢:\↢:g
s:&lbbar;:\℔:g
s:&lbull;:\⁌:g
s:ľ:\ľ:g
s:ļ:\ļ:g
s:⌈:\⌈:g
s:{:\{:g
s:л:\л:g
s:&ldlbtilde;:\︢:g
s:&ldot;:\⋖:g
s:&ldotb;:\ḷ:g
s:“:\“:g
s:„:\„:g
s:≤:\≤:g
s:⋚:\⋚:g
s:⩽:\≤:g
s:&lett;:\ɫ:g
s:⌊:\⌊:g
s:≶:\≶:g
s:&lgr;:\λ:g
s:↽:\↽:g
s:↼:\↼:g
s:▄:\▄:g
s:&lhring;:\ʿ:g
s:љ:\љ:g
s:&llig;:\︠:g
s:ŀ:\ŀ:g
s:≨:\≨:g
s:⪉:\:g
s:⪇:\≨:g
s:⋦:\⋦:g
s:&longa;:\𝆷:g
s:&longs;:\ſ:g
s:&lord;:ll\͠:g
s:&loure;:\𝆂:g
s:∗:\∗:g
s:_:\_:g
s:◊:\◊:g
s:⧫:\✦:g
s:(:\(:g
s:&lrarr2;:\⇆:g
s:&lrepeat;:\𝄆:g
s:&lrhar2;:\⇋:g
s:‹:\‹:g
s:↰:\↰:g
s:≲:\≲:g
s:[:\[:g
s:‘:\‘:g
s:‚:\‚:g
s:&lstrike;:l\̴:g
s:ł:\ł:g
s:<:\&#60;:g
s:⋋:\⋋:g
s:<ilde;:l\̃:g
s:⋉:\⋉:g
s:◃:\◃:g
s:⊴:\⊴:g
s:◂:\◂:g
s:≨︀:\≨:g
s:&m;:\𝆐:g
s:¯:\¯:g
s:♂:\♂:g
s:✠:\✠:g
s:↦:\↦:g
s:&marc-stacc;:\𝆀:g
s:&marc;:\𝅿:g
s:▮:\▮:g
s:&maxima;:\𝆶:g
s:м:\м:g
s:—:\—:g
s:&mgr;:\μ:g
s:µ:\µ:g
s:∣:\∣:g
s:·:\·:g
s:&midhalfring;:\˓:g
s:&minima;:\𝆹𝅥:g
s:&minimab;:\𝆺𝅥:g
s:−:\−:g
s:⊟:\⊟:g
s:…:\…:g
s:&mmacr;:m\̄:g
s:∓:\∓:g
s:⊧:\⊧:g
s:&moonb;:\𝅓:g
s:&moonq1;:\☽:g
s:&moonq4;:\☾:g
s:&moonw;:\𝅒:g
s:&mtilde;:m\̃:g
s:μ:\μ:g
s:&multirest;:\𝄺:g
s:⊸:\⊸:g
s:⊯:\⊯:g
s:⊮:\⊮:g
s:∇:\∇:g
s:ń:\ń:g
s:≉:\≉:g
s:ʼn:\ʼn:g
s:&nat;:\♮:g
s:&natdown;:\𝄯:g
s:&natup;:\𝄮:g
s:♮:\♮:g
s: :\ :g
s:ň:\ň:g
s:ņ:\ņ:g
s:≇:\≇:g
s:н:\н:g
s:–:\–:g
s:&ndot;:\ṅ:g
s:≠:\≠:g
s:↗:\↗:g
s:&neben;:\𝆧:g
s:≢:\≢:g
s:∄:\∄:g
s:≧̸:\≱:g
s:≱:\≱:g
s:⩾̸:\≱:g
s:&ngr;:\ν:g
s:&ngrave;:\ǹ:g
s:≯:\≯:g
s:⇎:\⇎:g
s:↮:\↮:g
s:∋:\∍:g
s:њ:\њ:g
s:⇍:\⇍:g
s:≦̸:\≰:g
s:↚:\↚:g
s:‥:\‥:g
s:≰:\≰:g
s:⩽̸:\≰:g
s:≮:\≮:g
s:⋪:\⋪:g
s:⋬:\⋬:g
s:&nmacr;:n\̄:g
s:∤:\∤:g
s:¬:\¬:g
s:¬e128;:\𝅘𝅥𝅲:g
s:¬e16;:\𝅘𝅥𝅯:g
s:¬e1;:\𝅝:g
s:¬e2;:\𝅗𝅥:g
s:¬e32;:\𝅘𝅥𝅰:g
s:¬e4;:\𝅘𝅥:g
s:¬e64;:\𝅘𝅥𝅱:g
s:¬e8;:\𝅘𝅥𝅮:g
s:∉:\∉:g
s:∦:\∦:g
s:⊀:\⊀:g
s:⪯̸:\⋠:g
s:⇏:\⇏:g
s:↛:\↛:g
s:⋫:\⋫:g
s:⋭:\⋭:g
s:⊁:\⊁:g
s:⪰̸:\⋡:g
s:≁:\≁:g
s:≄:\≄:g
s:∤:\:g
s:∦:\∦:g
s:⊄:\⊄:g
s:⫅̸:\⊈:g
s:⊈:\⊈:g
s:⊅:\⊅:g
s:⫆̸:\⊉:g
s:⊉:\⊉:g
s:ñ:\ñ:g
s:ν:\ν:g
s:&nullnote;:\𝅙:g
s:#:\#:g
s:№:\№:g
s: :\ :g
s:⊭:\⊭:g
s:⊬:\⊬:g
s:↖:\↖:g
s:Ⓢ:\Ⓢ:g
s:&oacgr;:\ό:g
s:ó:\ó:g
s:⊛:\⊛:g
s:&obreve;:\ŏ:g
s:&ocaron;:\ǒ:g
s:⊚:\⊚:g
s:ô:\ô:g
s:о:\о:g
s:&odagrgr;:\ὃ:g
s:&odaoxgr;:\ὅ:g
s:⊝:\⊝:g
s:ő:\ő:g
s:⊙:\⊙:g
s:&odota;:\ȯ:g
s:&odotb;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:&porrectusflex;:\𝇚:g
s:£:\£:g
s:&ppmacr;:p\̅p\̅:g
s:≺:\≺:g
s:⪷:\≾:g
s:⪯:\≼:g
s:&pri;:p\̢:g
s:′:\′:g
s:⪵:\:g
s:⪹:\⋨:g
s:⋨:\⋨:g
s:&pro;:p\̳:g
s:∏:\∏:g
s:&projectDesc;:<projectDesc><p>Digitized for the Digital Library, University of Virginia Library</p></projectDesc>:g
s:∝:\∝:g
s:≾:\≾:g
s:&psgr;:\ψ:g
s:ψ:\ψ:g
s:&psili;:\᾿:g
s:&pstrike;:p\̴:g
s:&ptilde;:p\̃:g
s: :\ :g
s:&qtilde;:q\̃:g
s:&qtrtoneflat;:\𝄳:g
s:&qtrtonesharp;:\𝄲:g
s:&que;:q\̢:g
s:?:\?:g
s:":\":g
s:&r;:\𝆌:g
s:⇛:\⇛:g
s:⇒:\⇒:g
s:ŕ:\ŕ:g
s:√:\√:g
s:⟩:\〉:g
s:»:\»:g
s:&rarr2;:\⇉:g
s:→:\→:g
s:↪:\↪:g
s:↬:\↬:g
s:↣:\↣:g
s:↝:\↝:g
s:&rbrevis;:\𝇃:g
s:ř:\ř:g
s:ŗ:\ŗ:g
s:⌉:\⌉:g
s:}:\}:g
s:р:\р:g
s:&rdlbtilde;:\︣:g
s:”:\”:g
s:”:\“:g
s:ℜ:\ℜ:g
s:▭:\▭:g
s:®:\®:g
s:&repeatdots;:\𝄈:g
s:&resp_images_Apex;:<respStmt><resp>Creation of digital images from microfilm</resp><name>Apex ePublishing Data Services</name></respStmt>:g
s:&resp_images_acme;:<respStmt><resp>Creation of digital images</resp><name>Acme Bookbinding (Charlestown, Massachusetts)</name></respStmt>:g
s:&resp_images_dlps;:<respStmt><resp>Creation of digital images</resp><name>Digital Library Production Services, University of Virginia Library</name></respStmt>:g
s:&resp_images_heckman;:<respStmt><resp>Creation of digital images</resp><name>Heckman Bindery</name></respStmt>:g
s:&resp_images_sc;:<respStmt><resp>Creation of digital images</resp><name>Special Collections Digital Center, University of Virginia Library</name></respStmt>:g
s:&resp_markup1_Apex;:<respStmt><resp>TEI XML markup in conformance with the uva-dl-tei DTD in itsvendor mode</resp><name>Apex ePublishing Data Services</name></respStmt>:g
s:&resp_markup1_TechBooks;:<respStmt><resp>TEI XML markup in conformance with uvalib.dtd (TEI Lite withconvenience elements)</resp><name>TechBooks</name></respStmt>:g
s:&resp_markup2_Apex2DLPS;:<respStmt><resp>Automated markup conversion for conformance with the uva-dl-teiDTD in its post-keyboarding mode</resp><name>Digital Library Production Services, University of Virginia Library</name></respStmt>:g
s:&resp_markup2_TechBooks2DLPS;:<respStmt><resp>Automated markup conversion for conformance withteixlite_mod.dtd (TEI Lite with "entity" attribute on pbelement)</resp><name>Digital Library Production Services, University of Virginia Library</name></respStmt>:g
s:&resp_ocr_DLPS;:<respStmt id="resp_ocr_DLPS"><resp>Creation of electronic transcription by optical characterrecognition (OCR); TEI XML markup in conformance with the uva-dl-teiDTD in its OCR mode</resp><name>Digital Library Production Services, University of Virginia Library</name></respStmt>:g
s:&resp_transcription_Apex;:<respStmt><resp>Creation of electronic transcription</resp><name>Apex ePublishing Data Services</name></respStmt>:g
s:&resp_transcription_TechBooks;:<respStmt><resp>Creation of electronic transcription</resp><name>TechBooks</name></respStmt>:g
s:&rest128;:\𝅂:g
s:&rest16;:\𝄿:g
s:&rest1;:\𝄻:g
s:&rest2;:\𝄼:g
s:&rest32;:\𝅀:g
s:&rest4;:\𝄽:g
s:&rest64;:\𝅁:g
s:&rest8;:\𝄾:g
s:&rfinalbar;:\𝄃:g
s:⌋:\⌋:g
s:&rgr;:\ρ:g
s:⇁:\⇁:g
s:⇀:\⇀:g
s:ρ:\ρ:g
s:ϱ:\ϱ:g
s:˚:\˚:g
s:&rip;:\𝆆:g
s:&rlarr2;:\⇄:g
s:&rlhar2;:\⇌:g
s:&rlig;:\︡:g
s:&rlongaimperf;:\𝇂:g
s:&rlongaperf;:\𝇁:g
s:&rmacr;:r\̄:g
s:&rminima;:\𝇅:g
s:):\):g
s:⦔:\:g
s:&rptfig1;:\𝄍:g
s:&rptfig2;:\𝄎:g
s:&rptfig3;:\𝄏:g
s:&rrepeat;:\𝄇:g
s:›:\›:g
s:&rsemibr;:\𝇄:g
s:&rsemimin;:\𝇆:g
s:↱:\↱:g
s:]:\]:g
s:’:\’:g
s:’:\‘:g
s:⋌:\⋌:g
s:&rtilde;:r\̃:g
s:⋊:\⋊:g
s:▹:\▹:g
s:⊵:\⊵:g
s:▸:\▸:g
s:℞:\℞:g
s:&s;:\𝆍:g
s:ś:\ś:g
s:&samalg;:\∐:g
s:&sbsol;:\﹨:g
s:≻:\≻:g
s:&scandicus;:\𝇖:g
s:&scandicusflex;:\𝇛:g
s:⪸:\≿:g
s:š:\š:g
s:≽:\≽:g
s:⪰:\≽:g
s:ş:\ş:g
s:&schwa;:\ə:g
s:ŝ:\ŝ:g
s:⪶:\:g
s:⪺:\⋩:g
s:⋩:\⋩:g
s:&scriptP;:\℘:g
s:&scripte;:\ℯ:g
s:≿:\≿:g
s:с:\с:g
s:⋅:\⋅:g
s:⊡:\⊡:g
s:§:\§:g
s:&segno;:\𝄋:g
s:;:\;:g
s:&semibrb;:\𝆺:g
s:&semibrw;:\𝆹:g
s:&semiminb;:\𝆺𝅥𝅮:g
s:&semiminw;:\𝆹𝅥𝅮:g
s:∖:\∖:g
s:✶:\✶:g
s:&sfgr;:\ς:g
s:⌢:\⌢:g
s:&sgr;:\σ:g
s:♯:\♯:g
s:&sharpdown;:\𝄱:g
s:&sharpup;:\𝄰:g
s:щ:\щ:g
s:ш:\ш:g
s:&shortbar;:\𝄅:g
s:­:\­:g
s:σ:\σ:g
s:ς:\ς:g
s:∼:\∼:g
s:≃:\≃:g
s:&slur;:\𝅷:g
s:&smacr;:s\̄:g
s:&smear;:\𝆈:g
s:∣:\:g
s:⌣:\⌣:g
s:&snap;:\𝆭:g
s:ь:\ь:g
s:/:\/:g
s:♠:\♠:g
s:∥:\∥:g
s:&sprechstem;:\𝅦:g
s:&sqB;:\𝇒:g
s:&sqb;:\𝅇:g
s:⊓:\⊓:g
s:⊔:\⊔:g
s:⊏:\⊏:g
s:⊑:\⊑:g
s:⊐:\⊐:g
s:⊒:\⊒:g
s:□:\□:g
s:□:\□:g
s:▪:\▪:g
s:&sqw;:\𝅆:g
s:∖:\∖:g
s:⌣:\⌣:g
s:⋆:\⋆:g
s:&sstilde;:ss\͠:g
s:&sstrike;:s\̴:g
s:&stacc;:\𝅼:g
s:&stacciss;:\𝅾:g
s:&staff1;:\𝄖:g
s:&staff2;:\𝄗:g
s:&staff3;:\𝄘:g
s:&staff4;:\𝄙:g
s:&staff5;:\𝄚:g
s:&staff6;:\𝄛:g
s:☆:\⋆:g
s:★:\★:g
s:&stem;:\𝅥:g
s:&stilde;:s\̃:g
s:⊂:\⊂:g
s:⫅:\⊆:g
s:⊆:\⊆:g
s:⫋:\⊊:g
s:⊊:\⊊:g
s:∑:\∑:g
s:&sun;:\☉:g
s:♪:\♩:g
s:¹:\¹:g
s:²:\²:g
s:³:\³:g
s:⊃:\⊃:g
s:⫆:\⊇:g
s:⊇:\⊇:g
s:⫌:\⊋:g
s:⊋:\⊋:g
s:ß:\ß:g
s:⌖:\⌖:g
s:τ:\τ:g
s:ť:\ť:g
s:ţ:\ţ:g
s:т:\т:g
s:⃛:\⃛:g
s:⌕:\⌕:g
s:&ten;:\𝅽:g
s:&tgr;:\τ:g
s:∴:\∴:g
s:&thetas;:\θ:g
s:ϑ:\ϑ:g
s:&thgr;:\θ:g
s: :\ :g
s:≈:\≈:g
s:∼:\∼:g
s:þ:\þ:g
s:&tie;:\𝅵:g
s:˜:\˜:g
s:×:\×:g
s:⊠:\⊠:g
s:&tipi;:\𝇋:g
s:&tipid1;:\𝇌:g
s:&tipid2;:\𝇍:g
s:&tipid3;:\𝇎:g
s:&tipp;:\𝇊:g
s:&tmacr;:t\̄:g
s:⊤:\⊤:g
s:&torculus;:\𝇘:g
s:&torculusresup;:\𝇜:g
s:&tppi;:\𝇈:g
s:&tppp;:\𝇇:g
s:&tpppd1;:\𝇉:g
s:‴:\‴:g
s:&tr;:\𝆖:g
s:™:\™:g
s:&trem1;:\𝅧:g
s:&trem2;:\𝅨:g
s:&trem3;:\𝅩:g
s:&tridb;:\𝅏:g
s:&tridw;:\𝅎:g
s:≜:\≜:g
s:&trilb;:\𝅋:g
s:&trilw;:\𝅊:g
s:&trirb;:\𝅍:g
s:&trirdb;:\𝅕:g
s:&trirdw;:\𝅔:g
s:&trirw;:\𝅌:g
s:&tritng;:\𝆋:g
s:&triub;:\𝅉:g
s:&triurb;:\𝅑:g
s:&triurw;:\𝅐:g
s:&triuw;:\𝅈:g
s:ц:\ц:g
s:ћ:\ћ:g
s:&tstar:<hi rend=\"super\">*</hi><hi rend=\"sub\">*</hi><hi rend=\"super\">*</hi>:g
s:&tstar;:<hi rend=\"super\">*</hi><hi rend=\"sub\">*</hi><hi rend=\"super\">*</hi>'>:g
s:ŧ:\ŧ:g
s:&ttilde;:t\̃:g
s:&tttilde;:tt\͠:g
s:&turn;:\𝆗:g
s:&turns;:\𝆙:g
s:&turnup;:\𝆚:g
s:≬:\≬:g
s:⇑:\⇑:g
s:&uacgr;:\ύ:g
s:ú:\ú:g
s:&uarr2;:\⇈:g
s:↑:\↑:g
s:ў:\ў:g
s:ŭ:\ŭ:g
s:&ucaron;:\ǔ:g
s:û:\û:g
s:у:\у:g
s:&udagr;:\ὑ:g
s:ű:\ű:g
s:&udiagr;:\ΰ:g
s:&udigr;:\ϋ:g
s:&ugr;:\υ:g
s:ù:\ù:g
s:&ugrgr;:\ὺ:g
s:↿:\↿:g
s:↾:\↾:g
s:▀:\▀:g
s:⌜:\⌜:g
s:⌏:\⌏:g
s:ū:\ū:g
s:¨:\¨:g
s:&unknown:[unknown character]:g
s:ų:\ų:g
s:&upbow;:\𝆫:g
s:&upegr;:\ῦ:g
s:⊎:\⊎:g
s:&upsgr;:\ὐ:g
s:υ:\υ:g
s:&upsoxgr;:\ὔ:g
s:&upspegr;:\ὖ:g
s:⌝:\⌝:g
s:⌎:\⌎:g
s:ů:\ů:g
s:ũ:\ũ:g
s:▵:\▵:g
s:▴:\▴:g
s:ü:\ü:g
s:⇕:\⇕:g
s:⊨:\⊨:g
s:↕:\↕:g
s:в:\в:g
s:⊢:\⊢:g
s:⊻:\⊻:g
s:⋮:\⋮:g
s:|:\|:g
s:&virga;:\𝇓:g
s:⊲:\⊲:g
s:&vmacr;:v\̄:g
s:&vprime;:\′:g
s:∝:\∝:g
s:⊳:\⊳:g
s:⫋︀:\:g
s:⊊︀:\⊊:g
s:⫌︀:\⊋:g
s:⊋︀:\⊋:g
s:&vtilde;:\ṽ:g
s:&wbull;:\◦:g
s:ŵ:\ŵ:g
s:≙:\≙:g
s:℘:\℘:g
s:≀:\≀:g
s:◯:\○:g
s:▽:\▽:g
s:&xgr;:\ξ:g
s:⟺:\↔:g
s:⟷:\↔:g
s:ξ:\ξ:g
s:⟸:\⇐:g
s:&xnote;:\𝅃:g
s:⟹:\⇒:g
s:&xtilde;:x\̃:g
s:△:\△:g
s:ý:\ý:g
s:я:\я:g
s:ŷ:\ŷ:g
s:ы:\ы:g
s:¥:\¥:g
s:&ygrave;:\ỳ:g
s:ї:\ї:g
s:&ymacr;:\ȳ:g
s:&yogh;:\ȝ:g
s:&ytilde;:\ỹ:g
s:ю:\ю:g
s:ÿ:\ÿ:g
s:&z;:\𝆎:g
s:ź:\ź:g
s:ž:\ž:g
s:з:\з:g
s:ż:\ż:g
s:ζ:\ζ:g
s:&zgr;:\ζ:g
s:ж:\ж:g
s:&zmacr;:z\̄:g
s:&zstrike;:z\̴:g
s:&ztilde;:z\̃:g
# We want to replace all human readable entities in TEI files with the numeric character reference.
# We also want to remove the entity declarations included in the document type definition in order than libxml2 can process these documents withouth undergoing entity substitution and thus either bloating the file or making it invalid.
# We used Nokogiri to create a hash of entities declared in the document and removed those items from the hash that had a value of 'nil'.
tei = Nokogiri.XML(File.read("/lib_content37/Rimage/data_repos/early_american_fiction/#{eaf_id}.tei.xml")) {|config| config.options = Nokogiri::XML::ParseOptions::NOENT }; nil
entities_hash = Hash.new
tei.internal_subset.entities.each {|e|
entities_hash[e.first] = e.last.original_content
}; nil
entities_hash.delete_if {|k,v| v.nil?}
File.open("/lib_content37/Rimage/data_repos/entities_greek.txt", 'w') {|file| file.write(entities_hash)}
# We then wrote this hash to a file which was mainuplated greatly in Vi such that each line was a substitution statement valid in sed/ex/vi such that the corpus of TEI files could be read, one line at a time, and search and replace could be excuted.
# For example:
s:ĥ:\ĥ:g
# In addition we added to this file a substitution statement for the ENTITY declarations at the top of each TEI file. This is a conditional substittion of the form /start/,/end/ operation:
/ENTITY % ISOlat1 SYSTEM/,/ENTITY % UVAsupp SYSTEM/ d
# In the above, for all lines found between the beginning match to the ending match and then delete the line(s). This strips six lines out of each TEI File:
<!ENTITY % ISOlat1 SYSTEM "http://text.lib.virginia.edu/charent/iso-lat1.ent"> %ISOlat1;
<!ENTITY % ISOlat2 SYSTEM "http://text.lib.virginia.edu/charent/iso-lat2.ent"> %ISOlat2;
<!ENTITY % ISOnum SYSTEM "http://text.lib.virginia.edu/charent/iso-num.ent"> %ISOnum;
<!ENTITY % ISOpub SYSTEM "http://text.lib.virginia.edu/charent/iso-pub.ent"> %ISOpub;
<!ENTITY % ISOtech SYSTEM "http://text.lib.virginia.edu/charent/iso-tech.ent"> %ISOtech;
<!ENTITY % UVAsupp SYSTEM "http://text.lib.virginia.edu/charent/uva-supp.ent"> %UVAsupp;
# Then we used a loop in bash where each TEI file was read line by line and each substitution statement was invoked using sed.
ls *.xml | while read file; do sed -i'' -f entities.txt "$file"; done
# Validate the files
ls *.xml | while read file; do xmllint --noout --valid $file; done