Closed bksubhuti closed 9 months ago
The code does not pick up titles.. Here is sample code
String _cleanText(String text) {
final regexHtmlTags = RegExp(r'<[^>]*>');
text = text.replaceAll(regexHtmlTags, '');
text = text.replaceAll('"', '');
text = text.replaceAll("'", '');
return text;
}
String _cleanWord(String word) {
final reToken = RegExp(r'[^a-zāīūṅñṭḍṇḷṃ]');
final cleanWord = word.replaceAll(reToken, '');
return cleanWord;
}
HTML
<p class="chapter">10. daṇḍavagga</p>
<p class="subhead">1. chabbaggiyabhikkhuvatthu</p>
<p class="bodytext">
<span class="bld">sabbe</span>
<a name="V2.0028"></a>
<a name="P3.0048"></a>
<a name="M2.0031"></a>
<span class="bld">tasantī</span>ti imaṃ dhammadesanaṃ satthā jetavane viharanto chabbaggiye bhikkhū ārabbha kathesi.
</p>
<p class="bodytext">ekasmiñhi samaye sattarasavaggiyehi senāsane paṭijaggite chabbaggiyā bhikkhū "nikkhamatha, mayaṃ mahallakatarā, amhākaṃ etaṃ pāpuṇātī"ti vatvā tehi "na mayaṃ dassāma, amhehi paṭhamaṃ paṭijaggita"nti vutte te bhikkhū pahariṃsu. sattarasavaggiyā maraṇabhayatajjitā mahāviravaṃ viraviṃsu. satthā tesaṃ saddaṃ sutvā "kiṃ ida"nti pucchitvā "idaṃ nāmā"ti ārocite "na, bhikkhave, ito paṭṭhāya bhikkhunā nāma evaṃ kattabbaṃ, yo karoti, so imaṃ nāma āpattiṃ āpajjatī"ti <span class="bld">pahāradānasikkhāpadaṃ</span> (pāci. 449 ādayo) paññāpetvā, "bhikkhave, bhikkhunā nāma ‘yathā ahaṃ, tatheva aññepi daṇḍassa tasanti, maccuno bhāyantī’ti ñatvā paro na paharitabbo, na ghātetabbo"ti vatvā anusandhiṃ ghaṭetvā dhammaṃ desento imaṃ gāthamāha – </p>
<p class="hangnum">
<a name="para129"></a>
<span class="paranum">129</span>.
</p>
<p class="gatha1"> "sabbe tasanti daṇḍassa, sabbe bhāyanti maccuno,</p>
<p class="gathalast">attānaṃ upamaṃ katvā, na haneyya na ghātaye"ti.</p>
<p class="bodytext">tattha <a name="P3.0049"></a>
<span class="bld">sabbe tasantī</span>ti sabbepi sattā attani daṇḍe patante tassa daṇḍassa tasanti. <span class="bld">maccuno</span>ti maraṇassāpi <span class="bld">bhāyanti</span>yeva. imissā ca desanāya byañjanaṃ niravasesaṃ, attho pana sāvaseso. yathā hi raññā "sabbe sannipatantū"ti bheriyā carāpitāyapi rājamahāmatte ṭhapetvā sesā sannipatanti, evamidha "sabbe tasantī"ti vuttepi hatthājāneyyo assājāneyyo usabhājāneyyo khīṇāsavoti ime cattāro ṭhapetvā avasesāva tasantīti veditabbā. imesu hi khīṇāsavo sakkāyadiṭṭhiyā pahīnattā maraṇakasattaṃ apassanto na bhāyati, itare tayo sakkāyadiṭṭhiyā <a name="V2.0029"></a> balavattā attano paṭipakkhabhūtaṃ sattaṃ apassantā na bhāyantīti. <span class="bld">na haneyya na ghātaye</span>ti yathā
</p>
Issue is found.. waiting for table export.
If you search for udāyittheravatthu you will not find it in the "search suggest" from the "wordlist" built at the beginning of the startup. You can search for it. It works. However, you are led to beleive it is not present.
Sutta titles.. call to action button can find it.