我试图从一堆段落中提取两个句子,但我被卡住了......基本上,这些段落看起来像这样:
<p class="some_paragraph">This is a sentence. Here comes another sentence. A third sentence.</p>
<p class="some_paragraph">Another sentence here. Interesting information. Very interesting.</p>
<p class="some_paragraph">This is a sentence. Here comes another sentence. A third sentence.</p>
我需要做的是,在这三个段落的所有 9 个句子中找到两个“最短”的句子。必须将两个提取的句子放入以下范围:
<span class="span1">Shortest sentence comes here</span>
<span class="span2">Second shortest sentence comes here</span>
我怎么做?