Recently in Artificial Intelligence Category

Language, Proof and Logic

| 1 Comment | No TrackBacks

logic.jpgI just ordered my next book (for US $1.20 from eBay USA + US $11 shipping). In germany this book costs from ~20 up to ~60 EUR.

Language, Proof and Logic covers topics such as the boolean connectives, formal proof techniques, quantifiers, basic set theory, and induction. Advanced chapters include proofs of soundness and completeness for propositional and predicate logic, as well as an accessible sketch of Godel's first incompleteness theorem. The book is appropriate for a wide range of courses, from first logic courses for undergraduates (philosophy, mathematics, and computer science) to a first graduate logic course.

This kind of logic has been introduced in the first two chapters of my previous AI book. I want to dig deeper :)

New book ordered :)

| No Comments | 1 TrackBack

21wDjQ05uLL._SL500_AA180_.jpg While my Real World Haskell book nears completion, I ordered on Amazon "Grundkurs Künstliche Intelligenz: Eine praxisorientierte Einführung" (which is german and says: Basics of Artificial Intelligence: A practic-oriented introduction). This book seems to cover all the material which is taught on the basic AI classes at the universities. Sadly, I did not have any AI class during my university time (I studied informatics). And the book has, as far as I know, only good critics.

I am looking for a way of doing fuzzy string matching using the Haskell programming language. I want to parse the user's text input (which is a normal natural english sentence). The user may will have errors in his text, which should get recognized and replaced automatically by my program. I think the easiest way would be calculating the 'Levenshtein distance' to all known words and use the word with the smallest distance. Although, this is not really fuzzy logic (fuzzy logic depends, in my view, more on the context of the sentence which is written), I think it is a good starting point in order to get an initial version working. According to the Wikibook the Haskell implementation would be as easy as this:

levenshtein :: String- > String -> Int
levenshtein s t = 
    d!!(length s)!!(length t) 
    where d = [[distance m n|n<-[0..length t]]|m<-[0..length s]]
          distance i 0 = i
          distance 0 j = j
          distance i j = minimum [d!!(i-1)!!j+1, 
                                 d!!i!!(j-1)+1, d!!(i-1)!!(j-1) 
                                  + (if s!!(i-1)==t!!(j-1) 
                                     then 0 else 1)]

This method may be too slow if I've to compare each word with about serveral thousands words. Hrrm.

Or using another implementation, because:
The implementations of the Levenshtein algorithm on this page are illustrative only. Applications will, in most cases, use implementations which use heap allocations sparingly, in particular when large lists of words are compared to each other.

Yet another way would be implementing a Fuzzy Logic Library (as learned in the Neuronal Fuzzy Networks lecture @ Aachen University of Applied Sciences) from scratch.

About this Archive

This page is an archive of recent entries in the Artificial Intelligence category.

Blogroll is the next category.

Find recent content on the main index or look in the archives to find all content.