如何使用斯坦福postagger进行词性标注转

一、如何使用斯坦福pos tagger进行词性标注转

Tagging text with Stanford POS Tagger in Java A78 RepliesI was looking for a way to extract “Nouns” from a set of strings in Java and I found, using Google, the amazing stanford NLP (Natural Language Processing) Group POS.The libras you “tag” the words in your string. That is, for each word, the “tagger” gets w noun, a verb ..etc. and then assigns the result to the word. For example:“This is a sample sentence”will be o?1 This/DT is/VBZ a/DT samntence/NNTo do this, the tagger has to load a “trained” file that contains the necessary informatr to tag the “trained” file is called a model and has the extension “.tagger”. There are several trained models nford NLP grouerent languages.In this post I will show you how to use such library in your Java application using Eclipse IDE.Create a new project.Create a new folder called “taggers”.Download the zip file provided by stanford group.Extract the zip file and Open the extracted folder.You will find a folder called models, open it and copy the model you want to the “taggers” folder we created earlier + its corresponding (with the same name) “.props” file.Now we need to import the library to our project so that Eclipse does not complain when we use it in our code. So, right click your project > Build Path > Configure Build Path.In the new window, Open the libraries tab (from the top) and click the Add External Jars button.Locate the “stanford-postagger.jar” file that is found in the extracted folder.Now enough with the configuration and let’s start coding. In your project create a new Class and in its main method write:?12345 // Initialize the tagger MaxentTagger tagger = newMaxentTagger( “taggers/left3words-distsim-wsj-0-18.tagger”);The MaxentTagger constructor takes the path to the model (trained file) as a parameter:“NAME_OF_FOLDER/NAME_OF_MODEL.tagger”.Once you write the code, Eclipse will tell you to import the MaxentTagger and inform you that it throws some exceptions. Use eclipse to add all that to the code.Finally, we tag the string we want:?0102030405060708091011 // The sample string String sample = “This is a sample text”; // The tagged string String tagged = tagger.tagString(sample); // Output the result System.out.println(tagged);

如何使用斯坦福postagger进行词性标注转

二、怎样才能学好英语

我是一个高考的过来人,高考成绩129分,平时大考碰狗屎运也考过130+的分数。首先我想请阁下明白一个道理冰冻三尺非一日之寒,所以坚持很重要,英语是一门很看重积累的科目。

虽然我高考已经好多年了,而且今年即将大学毕业,踏入社会。但英语一直没有丢,英语一直是我的排头兵!我对英语的自信还有,我觉得学好英语不难,重要的是你要有恒心,急躁冒进,三天打渔两天晒网都是不行的。在这里我就毛遂自荐一下我的学习方法吧:

首先先你要端正心态,不要急躁,,你做你自己的事,这样才能静下心来学习。要成为英语高手就必须比别人走更多的路,做更多的事。你应该明白一个事实,英语是单词和语法的综合,所以单词和语法都要拿下。

其次,对于单词,有如下几种方法,第一个,是加强记忆的频度,也就是说,早上记了几个,隔几个小时又看一次,总之一天之内,记忆的间隔不要太长,否则你辛苦积累的记忆会随着时间的延长而淡化,第二个,是可以根据自己的理解编顺口溜,比如good morning 是狗摸你…(见笑了)…,第三个,最重要的是,记单词的时候,不要忘了阅读,一边记单词,一边看文章,这样可以把孤立的单词串联起来,记忆的效果会加倍,第四个。我建议你记单词要分门别类记忆,要形成一个意群,比如,重要性用magnitude magnificence ,表示非常,大大地有exceedingly,tremendously,extremely……这样做在你写作时,是十分有好处的,写作时不要尽写一些低级词汇,你要写高级词汇,比如重要性写magnitude,许多写a multitude of 或者handsome。

再次,是语法。学习语法,首先要明白什么是主谓宾定状补,什么是系动词,什么是直接宾语,间接宾语,这些是学习语法的基础,语法是房子,主谓宾定状补等是沙石砖瓦。然后就要多做一些语法专项练习,并在此过程中不断总结,并时时回顾那些了解,那些依然不理解,需要注意的是,那些不理解的一定要花时间弄清楚,否则对自己的不负责将会导致英语语法一知半解的结局!这对于想成为英语高手的人来说,是十分不利的!(注:本人从开始时不知主谓宾,到熟练掌握语法,把语法书看了不下二十遍,书都翻烂了!莫笑本人愚笨……)

此外,对于完形填空以及阅读理解,那就只能靠平时的练习了,在这个过程中,你要时时总结,纵深对比,千万不要陷入题海战术只做题,不总结的误区当中。在做题的过程中,你把各种体型都总结了一遍,积累了丰富的经验,而且你还提升了自己的阅读速度,一举两得,所以做题是很重要的!其实,完形填空无非就是单项选择加语境分析,也就是说,做完形填空你的语法要好,而且你要积累比较多的固定搭配,短语,特殊用法等,完形填空的语法还是很重要的!对于阅读,我个人感觉是,纯粹是个人经验积累多少的问题,只有保证一定的练习量,你才能用质的提高!

最后,我建议你,平时读报,或者做题的时候,发现有好的句子好的词汇,你要抄下来,长期下来,你的作文会有提高的,需要说明的是,这个提高过程可能很缓慢,但是最后能收到很好的效果,以前25分的作文我都能保证在21-23这个级别,靠的就是对语法的熟练掌握和积累了许多较高级的词汇,句型,句子。我个人的理解是,在你的语法达到基本不会出错的程度上,作文便应该以词汇取胜,因为在这个层次上,大家的语法都差不多,没什么变化,唯一有变化的就是你的词汇!给你打个比方吧,很多想到“许多”就用many,但是你别忘了many a ;handsome;massive,innumerable;很多人想到“专家”就写expert,但很少人会想到specialist,很多人在想到“擅长”这词,就写be good at ,却不知还有更高级的表达法:be expert at 或者excel in ……高手和庸才,就体现在这些细微的差别上 !!

三、请问收款用的"POS机"的"POS"三个字母分别代表哪三个单词?谢谢

point of sale

本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。