以下是引用 singer 在 2006-5-16 19:58:36 的发言:
Thanks ,Dr.Xu, Your method works well.
I will put some sentences here.
before replacing:
A_DT Healthy_NNP Diet_NNP
A_DT healthy_JJ diet_NN is_VBZ very_RB important_JJ for_IN people_NNS ._. It_PRP contains_VBZ some_DT fat_JJ ,_,
after replacing:
A<DT>Healthy<NNP>Diet<NNP
A<DT>healthy<JJ>diet<NN>is<VBZ>very<RB>important<JJ>for<IN>people<NNS>.<.>
We can see there a few "<.>" here, how can I remove them?Thanks for your reply.
$line=~s/(\S+)\/(\S+)/<w POS="$2">$1<\/w>/g;以下是引用 xiaoz 在 2006-5-16 23:09:19 的发言:
I have actually uploaded a number of programs to this site that convert between different POS styles.