从用户描述中获取元数据转义文章,介词,单词 [英] from user description take metadata escape articles,prepositions,wh words

查看:65
本文介绍了从用户描述中获取元数据转义文章,介词,单词的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我有两个文本框,一个包含标题,第二个包含说明
从描述中,我想要元数据意味着逃逸文章的介词,例如……

Hi every body,
i have two text boxes one contain title second one contain description
from the description i want metadate means escapete articles prepositions wh words like what where...

推荐答案

我认为英语不是您的母语?

我正在尝试确定您想做的事情,我认为是从一块文本中提取所有单词,并丢弃文章,介词等.例如,如果文本为:
I assume English is not your native language?

I am trying to work out what you want to do, and I think is is to extract all the words from a block of text, and throw away the articles, prepositions, etc. For example, if the text was:
The quick, brown fox sat on the lazy dog.

您想要以诸如此类的单词作为结尾:
快速"
棕色"
"fox"
"sat"
懒惰"
狗"
我说的对吗?

如果不是,那么请尝试编辑您的问题,并提供有关您要达到的目标的更好信息.

如果我是,那么:
1)将输入文本分解成单个单词:使用正则表达式"\\ w +"可以做到这一点,而不必担心标点符号和/或空格.
2)浏览正则表达式生成的单词列表,并丢弃冠词,介词等.
3)完成.

You want to finish up with a list of words such as:
"quick"
"brown"
"fox"
"sat"
"lazy"
"dog"
Am I right?

If not, then please try to edit your question and provide better information about what you are trying to achieve.

If I am, then:
1) Break the input text into individual words: Use a regex "\\w+" should do it without faffing about with punctuation and / or spaces.
2) Go through the list of word generated by the regex, and discard articles, prepositions, etc.
3) Done.


这篇关于从用户描述中获取元数据转义文章,介词,单词的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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