开发者

Intelligent text parsing and translation

What would be an intelligent way to store text, so that it can be intelligently parsed and translated later on.

For example, The employee 开发者_如何学Cis outstanding as he can identify his own strengths and weaknesses and is comfortable with himself.

The above could be the generic text which is shown to the user prior to evaluation. If the user is a Male (say Shaun) or female (say Mary), the above text should be translated as follows.

Mary is outstanding as she can identify her own strengths and weaknesses and is comfortable with herself.

Shaun is outstanding as he can identify his own strengths and weaknesses and is comfortable with himself.

  1. How do we store the evaluation criteria in the first place with appropriate place or token holders. (In the above case employee should be translated to employee name and based on his gender the words he or she, himself or herself needs to be translated)

  2. Is there a mechanism to automatically translate the text with the above information.


The basic idea of doing something like this is called Mail Merge.
This page seems to discus how to implement something like this in Ruby.

[Edit]
A google search gave me this - http://freemarker.org/

Intelligent text parsing and translation


I don't know much about this library, but it looks like what you need.


This is a very broad question in the field of Natural Language Processing. There are numerous ways to go around it, the questions you asked seem too broad.

If I understand correctly part of your question this could be done this way :

@variable{name} is outstanding as @gender{he/she} can identify @gender{his/hers} own strengths and weaknesses and is comfortable with @gender{himself/herself}.

Or:

@name is outstanding as @he can identify @his own strengths and weaknesses and is comfortable with @himself.

... if gender is the major problem.


I have had some experience working with a tool called Grammatica, when building a custom user input excel like formula parsing and evaluation engine. It may not be to the level of sophistication you're looking for but it's a start. This basically uses many of the same concepts that popular code compiler parsers employ. It's definitely worth checking out.


I agree with Kornel, this question is too broad. What you seem to be talking about is semantics for which RDF's and OWL can be a good starting point. Read about modeling semantics using markup and you can work your way up from there.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜