home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.ai      Awaiting the gospel from Sarah Connor      1,954 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 280 of 1,954   
   Roberto Slepetys to All   
   Reducing to CNF - Conjuntive Normal Form   
   07 Mar 04 21:05:42   
   
   From: slepetys@homeworks.com.br   
      
   Hi,   
      
   I am construction a Full Text Search engine replacing the internal MySQL   
   engine in an experiment for index all the content of neswspaper's 20 years   
   of publications , and the first layer to do a search is to convert the   
   Boolean Phrase entered by the user to a CNF (conjuntive normal form).   
      
   I suppose this is a classical AI problem, and simplified in the universe of   
   just Boolean operations allowed: AND OR and NOT.   
      
   In Wolfran Mathematica, what I am looking for is to do a simple:   
   LogicalExpand of a Logical Phrase, like:   
   IN: LogicalExpand [  a && b && ! ( c || ( d && ! e))]   
   OUT: a && b && e && (! c || a) && b && ! c && ! d   
      
   All the FTS is programed in PERL, as I love it !, but I can't find a module   
   or an algorithm to reduce the expression to the CNF.   
      
   I know that the problem to reduce some sentence to the CNF form is   
   NP-complete, but I also read in my AI books that it's possible to implement   
   (without any garanties of the stop point and end time), as it is implemented   
   in Prolog or Lisp, then, my first approuch is to find some module to do the   
   reduction, if I cannot find, my second alternative is to glue my Perl   
   program to some Prolog interpreter (is it possible in Linux, I never tried   
   ?).   
      
   Could someone help me ?   
      
   Thanks   
   Roberto Slepetys   
      
   [ comp.ai is moderated.  To submit, just post and be patient, or if ]   
   [ that fails mail your article to , and ]   
   [ ask your news administrator to fix the problems with your system. ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca