识别前置位和单个POS [英] Identify prepositons and individual POS

查看:75
本文介绍了识别前置位和单个POS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为段落中的每个单词找到正确的词性.我正在使用Stanford POS Tagger.但是,我陷入了困境.

I am trying to find correct parts of speech for each word in paragraph. I am using Stanford POS Tagger. However, I am stuck at a point.

我想从段落中找出介词.

I want to identify prepositions from the paragraph.

Penn树库标签集说:

Penn Treebank Tagset says that:

IN  Preposition or subordinating conjunction

如何确定当前单词是介词还是从属连词.在这种情况下,如何只从段落中提取介词?

how, can I be sure if current word is be preposition or subordinating conjunction. How can I extract only prepositions from paragraph in this case?

推荐答案

我在理解单词实际上是介词还是从属连词方面取得了一些突破.

I have had some breakthrough to understand if the word is actually preposition or subordinating conjunction.

我已经解析了以下句子:

I have parsed following sentence :

她因为麦克与新女友到达而早早离开.

She left early because Mike arrived with his new girlfriend.

(这里是从属连词)

POS标记后

她_PRP离开了_VBD提前_RB,因为_IN Mike_NNP到达了_VBD with_IN his_PRP $ new_JJ girlie_NN ._.

She_PRP left_VBD early_RB because_IN Mike_NNP arrived_VBD with_IN his_PRP$ new_JJ girlfriend_NN ._.

在这里,以确保因为是介词或否,我已对该句子进行了解析.

here , to make sure because is a preposition or not I have parsed the sentence.

此处因为在IN之后以SBAR(从属子句)作为根具有直接父级.

here because has direct parent after IN as SBAR(Subordinate Clause) as root.

with 也属于IN,但其直接父级为 PP ,因此它是介词.

with also comes under IN but its direct parent will be PP so it is a preposition.

示例2:

将手放在伤口上,直到护士要求您将其摘下. (直到这里是协调连接)

Keep your hand on the wound until the nurse asks you to take it off. (here until is coordinating conjunction )

POS标记为:

在_IN the_DT上保留_VB your_PRP $ hand_NN伤口_NN直到_IN the_DT Nurse_NN asks_VBZ you_PRP to_TO take_VB it_PRP off_RP ._.

Keep_VB your_PRP$ hand_NN on_IN the_DT wound_NN until_IN the_DT nurse_NN asks_VBZ you_PRP to_TO take_VB it_PRP off_RP ._.

因此,直到和都标记为 IN .

So , until and on are marked as IN.

但是,当我们实际解析句子时,画面变得更加清晰.

However, picture gets clearer when we actually parse the sentence.

所以最后我得出结论,因为从属连词和with是介词.

尝试了许多句子的变体..除 before after 的某些情况外,几乎所有句子都适用.

Tried for many variations of sentences .. worked for almost all except some cases for before and after.

这篇关于识别前置位和单个POS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆