小编new*_*new的帖子

使用Perl将段落转换为句子

我在做Perl编程.我需要阅读一个段落并将每个句子打印出来作为一行.

谁知道怎么做?

以下是我的代码:

#! /C:/Perl64/bin/perl.exe

use utf8;

if (! open(INPUT, '< text1.txt')){
die "cannot open input file: $!";
}

if (! open(OUTPUT, '> output.txt')){
die "cannot open input file: $!";
}

select OUTPUT;

while (<INPUT>){
print "$_";
}

close INPUT;
close OUTPUT;
select STDOUT;
Run Code Online (Sandbox Code Playgroud)

perl text-segmentation

1
推荐指数
1
解决办法
2890
查看次数

标签 统计

perl ×1

text-segmentation ×1