55import org .springframework .core .io .ClassRelativeResourceLoader ;
66import org .springframework .core .io .Resource ;
77import org .springframework .core .io .ResourceLoader ;
8+
9+ import ai .elimu .model .v2 .enums .Language ;
810import lombok .extern .slf4j .Slf4j ;
911import java .io .File ;
1012import java .io .IOException ;
@@ -21,7 +23,7 @@ public void testExtractParagraphsFromChapterFile_ENG_GDL_1349() throws IOExcepti
2123 File xhtmlFile = resource .getFile ();
2224 log .debug ("xhtmlFile: " + xhtmlFile );
2325
24- List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile );
26+ List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile , Language . ENG );
2527
2628 assertEquals (2 , storyBookParagraphs .size ());
2729 assertEquals ("Fifth grade student, Little Miss Grace," , storyBookParagraphs .get (0 ));
@@ -35,7 +37,7 @@ public void testExtractParagraphsFromChapterFile_ENG_GDL_1855() throws IOExcepti
3537 File xhtmlFile = resource .getFile ();
3638 log .debug ("xhtmlFile: " + xhtmlFile );
3739
38- List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile );
40+ List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile , Language . ENG );
3941
4042 assertEquals (2 , storyBookParagraphs .size ());
4143 assertEquals ("Some wild cats have stripes." , storyBookParagraphs .get (0 ));
@@ -49,7 +51,7 @@ public void testExtractParagraphsFromChapterFile_ENG_GDL_1855_ch4() throws IOExc
4951 File xhtmlFile = resource .getFile ();
5052 log .debug ("xhtmlFile: " + xhtmlFile );
5153
52- List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile );
54+ List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile , Language . ENG );
5355
5456 assertEquals (2 , storyBookParagraphs .size ());
5557 assertEquals ("Some wild cats have spots." , storyBookParagraphs .get (0 ));
@@ -63,7 +65,7 @@ public void testExtractParagraphsFromChapterFile_ENG_LRA_377b7e63_ch1() throws I
6365 File xhtmlFile = resource .getFile ();
6466 log .debug ("xhtmlFile: " + xhtmlFile );
6567
66- List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile );
68+ List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile , Language . ENG );
6769
6870 assertEquals (1 , storyBookParagraphs .size ());
6971 assertEquals ("The moon rises." , storyBookParagraphs .get (0 ));
@@ -76,7 +78,7 @@ public void testExtractParagraphsFromChapterFile_ENG_LRA_377b7e63_ch5() throws I
7678 File xhtmlFile = resource .getFile ();
7779 log .debug ("xhtmlFile: " + xhtmlFile );
7880
79- List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile );
81+ List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile , Language . ENG );
8082
8183 assertEquals (1 , storyBookParagraphs .size ());
8284 assertEquals ("What if I try talking to them? The moon slowly moves toward the group of stars." , storyBookParagraphs .get (0 ));
@@ -89,7 +91,7 @@ public void testExtractParagraphsFromChapterFile_ENG_LRA_377b7e63_ch6() throws I
8991 File xhtmlFile = resource .getFile ();
9092 log .debug ("xhtmlFile: " + xhtmlFile );
9193
92- List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile );
94+ List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile , Language . ENG );
9395
9496 assertEquals (1 , storyBookParagraphs .size ());
9597 assertEquals ("Will they play with me? I am so different from them. I should try." , storyBookParagraphs .get (0 ));
@@ -102,7 +104,7 @@ public void testExtractParagraphsFromChapterFile_TGL_LRA_faa0d66e() throws IOExc
102104 File xhtmlFile = resource .getFile ();
103105 log .debug ("xhtmlFile: " + xhtmlFile );
104106
105- List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile );
107+ List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile , Language . TGL );
106108
107109 assertEquals (3 , storyBookParagraphs .size ());
108110 assertEquals ("WAAAAHHHH!" , storyBookParagraphs .get (0 ));
@@ -117,7 +119,7 @@ public void testExtractParagraphsFromChapterFile_TGL_LRA_7f877260_ch4() throws I
117119 File xhtmlFile = resource .getFile ();
118120 log .debug ("xhtmlFile: " + xhtmlFile );
119121
120- List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile );
122+ List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile , Language . TGL );
121123
122124 assertEquals (2 , storyBookParagraphs .size ());
123125 assertEquals ("Ano kaya kung kaya kang palundagin ng jelly beans nang napakataas?" , storyBookParagraphs .get (0 ));
@@ -131,7 +133,7 @@ public void testExtractParagraphsFromChapterFile_TGL_LRA_7f877260_ch13() throws
131133 File xhtmlFile = resource .getFile ();
132134 log .debug ("xhtmlFile: " + xhtmlFile );
133135
134- List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile );
136+ List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile , Language . TGL );
135137
136138 assertEquals (1 , storyBookParagraphs .size ());
137139 assertEquals ("\" Nagmumuni-muni lang,\" sabi niya." , storyBookParagraphs .get (0 ));
@@ -145,7 +147,7 @@ public void testExtractParagraphsFromChapterFile_HIN_GDL_1287_ch3() throws IOExc
145147 File xhtmlFile = resource .getFile ();
146148 log .debug ("xhtmlFile: " + xhtmlFile );
147149
148- List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile );
150+ List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile , Language . HIN );
149151
150152 assertEquals (1 , storyBookParagraphs .size ());
151153 assertEquals ("उस मोटे राजा के पास एक पतला कुत्ता था । एक दिन मोटा राजा और उसका पतला कुत्ता सैर करने गए।" , storyBookParagraphs .get (0 ));
@@ -158,7 +160,7 @@ public void testExtractParagraphsFromChapterFile_HIN_GDL_1296() throws IOExcepti
158160 File xhtmlFile = resource .getFile ();
159161 log .debug ("xhtmlFile: " + xhtmlFile );
160162
161- List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile );
163+ List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile , Language . HIN );
162164
163165 assertEquals (1 , storyBookParagraphs .size ());
164166 assertEquals ("एक बादल घुमने चला." , storyBookParagraphs .get (0 ));
@@ -171,7 +173,7 @@ public void testExtractParagraphsFromChapterFile_HIN_GDL_1296_ch3() throws IOExc
171173 File xhtmlFile = resource .getFile ();
172174 log .debug ("xhtmlFile: " + xhtmlFile );
173175
174- List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile );
176+ List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile , Language . HIN );
175177
176178 assertEquals (2 , storyBookParagraphs .size ());
177179 assertEquals ("साथ में चिड़िया भी उड़ती" , storyBookParagraphs .get (0 ));
@@ -185,7 +187,7 @@ public void testExtractParagraphsFromChapterFile_HIN_SW_99651_ch3() throws IOExc
185187 File xhtmlFile = resource .getFile ();
186188 log .debug ("xhtmlFile: " + xhtmlFile );
187189
188- List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile );
190+ List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile , Language . HIN );
189191
190192 assertEquals (2 , storyBookParagraphs .size ());
191193 assertEquals ("हमारा सबसे अच्छा मित्र है पक्षी!" , storyBookParagraphs .get (0 ));
@@ -199,7 +201,7 @@ public void testExtractParagraphsFromChapterFile_HIN_SW_10145_ch4() throws IOExc
199201 File xhtmlFile = resource .getFile ();
200202 log .debug ("xhtmlFile: " + xhtmlFile );
201203
202- List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile );
204+ List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile , Language . HIN );
203205
204206 assertEquals (3 , storyBookParagraphs .size ());
205207 assertEquals ("एक गोजर एक बड़े से भूरे पत्ते के भीतर" , storyBookParagraphs .get (0 ));
@@ -214,7 +216,7 @@ public void testExtractParagraphsFromChapterFile_HIN_SW_141016_ch8() throws IOEx
214216 File xhtmlFile = resource .getFile ();
215217 log .debug ("xhtmlFile: " + xhtmlFile );
216218
217- List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile );
219+ List <String > storyBookParagraphs = EPubParagraphExtractionHelper .extractParagraphsFromChapterFile (xhtmlFile , Language . HIN );
218220
219221 assertEquals (1 , storyBookParagraphs .size ());
220222 assertEquals ("\" देखो माँ, मैं बंदर की तरह झूल रही हूँ।\" " , storyBookParagraphs .get (0 ));
0 commit comments