I need to be able to programatically expand users’ search expressions such as:
X w/5 (Y || Z)
to
“X Y”~5 || “X Z”~5
Is there an existing library I can leverage to do this sort of thing? If not, what approach is recommended? This solution would live within a .NET environment.
I need to be able to programatically expand users’ search expressions such as: X
Share
You will want to take a look at conjuctive normal form http://en.wikipedia.org/wiki/Conjunctive_normal_form and disjunctive normal formhttp://en.wikipedia.org/wiki/Disjunctive_normal_form.
There is an algorithm you can implement as well as a link to a java implementation.