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
Copy file name to clipboardExpand all lines: js/import/convertPageStext.js
+15-7Lines changed: 15 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@ import {
4
4
calcBboxUnion,
5
5
calcBoxOverlap,
6
6
calcLang,
7
+
cleanFamilyName,
7
8
mean50,
8
9
round6,
9
10
unescapeXml,
@@ -33,6 +34,9 @@ export async function convertPageStext({ ocrStr, n }) {
33
34
/** @type {Set<string>} */
34
35
constlangSet=newSet();
35
36
37
+
/** @type {Set<string>} */
38
+
constfontSet=newSet();
39
+
36
40
functionconvertParStext(xmlPar){
37
41
/** @type {Array<OcrLine>} */
38
42
constparLineArr=[];
@@ -245,7 +249,7 @@ export async function convertPageStext({ ocrStr, n }) {
245
249
246
250
if(wordCharOrFontArr[i].length===0)continue;
247
251
248
-
letwordInit=false;
252
+
letwordCharN=0;
249
253
250
254
for(letj=0;j<wordCharOrFontArr[i].length;j++){
251
255
constcharOrFont=wordCharOrFontArr[i][j];
@@ -257,7 +261,7 @@ export async function convertPageStext({ ocrStr, n }) {
257
261
// (2) Runs of small caps that start with lower-case letters, which do not conform to the expectation that runs of small caps start with a capital letter.
0 commit comments