如何打印 $stopwords?它似乎是一个字符串($),但是当我打印它时,我得到:“HASH(0x8B694)”,每次运行时内存地址都会发生变化。
我正在使用 Lingua::StopWords,我只是想打印它正在使用的停用词,所以我确定那里有哪些停用词。我想打印这两个文件。
我需要如何尊重 $stopwords 吗?
这是代码:
use Lingua::StopWords qw( getStopWords );
open(TEST, ">results_stopwords.txt") or die("Unable to open requested file.");
my $stopwords = getStopWords('en');
print $stopwords;
我试过了:
my @temp = $stopwords;
print "@temp";
但这不起作用。帮助!
最后一点:我知道 Lingua::StopWords 有一个停用词列表,但我使用的是 (en),我只是想绝对确定我使用的是什么停用词,这就是我想打印它的原因理想情况下,我想将其打印到文件部分我应该已经知道如何操作的文件中。