根据特定的词语选择单词 [英] choosing words on basis of specific words

查看:94
本文介绍了根据特定的词语选择单词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有大量的unicode基础文本,每个单词都被标记。例如名词单词用NN标记(例如james \NN)所以我想将那些名词单词与该单词分开,为简单起见,这些名词单词用NN手动标记。需要帮助的朋友提前谢谢你:)

i have large amount of unicode base text with every word being tagged. e.g. noun words are tagged with NN (e.g. james\NN) so i want to separate those noun words from that text, for simplicity those noun words are manually tagged with NN., need help friends thank you in advance :)

推荐答案





您应该尝试查看正则表达式:

http://msdn.microsoft.com/en-us/library/az24scfc%28v = vs.110%29.aspx [ ^ ]



正则表达式非常强大:

1.检测匹配string

2.替换字符串中的内容

3.单独的标签



我也可以告诉你检查出String.Split哪个分割后会产生一个字符串数组,它比Regex更容易使用,但它没那么强大。



希望这个他lps。



LG。
Hi,

you should try to check out Regex:
http://msdn.microsoft.com/en-us/library/az24scfc%28v=vs.110%29.aspx[^]

Regex are really powerful to:
1. Detect matches in a string
2. Replace content in a string
3. Separate tags

I can also tell you to check out String.Split which splits up results in an array of strings and it is much easier to use than Regex, but it is not as powerful.

Hope this helps.

LG.


这篇关于根据特定的词语选择单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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