17 $stemmer =
$source->getElementsByTagName(
'stemmer');
19 foreach ($stemmer as $stemmerItem) {
20 foreach ($stemmerItem->childNodes as $childNode) {
21 if ($childNode->nodeType === XML_ELEMENT_NODE) {
22 $stemmerInfo[$childNode->localName]= $childNode->textContent;
27 $stopwords =
$source->getElementsByTagName(
'stopwords_file');
29 foreach ($stopwords as $stopwordsItem) {
30 foreach ($stopwordsItem->childNodes as $childNode) {
31 if ($childNode->nodeType === XML_ELEMENT_NODE) {
32 $stopwordsInfo[$childNode->localName]= $childNode->textContent;
37 return [
'stemmerInfo' => $stemmerInfo,
'stopwordsInfo' => $stopwordsInfo];