I’m wondering if PHP has the possibilities to build an on-line Natural Language Processing Application. PHP is designed to process strings, I have read on examples where PHP processes strings faster than arrays. And since Natural Spoken Language are strings…
Or are these things far beyond the possibilities from PHP and you need a more low level Language like C or even a special one like LISP. (programmed SKILL before, born out of LISP). Has anyone ever ventured on something like this?
(Yes I know, coming from a guy who still has problems making his classes flexible, it sounds ridicules. But I’m a dreamer :D)
Like we noticed! I mean this sorta cool thread popped to top and for a second…well it looked like…somebody was doing something interesting in PHP. How could we not comment endlessly? How could we not chip in to the discussion with barely a single computer science degree between the whole forum? I mean, this was like what…what was promised when we started playing with computers. You know…robots and stuff. This could be cool.
You don’t want to build a natural language processor, you want to build a compiler.
Let me explain: your question, distilled, is “How can I teach a computer to speak a language, without any intuition, no learning, and only the logic I give it?”. All language processors (natural or otherwise) are attempting to answer that question. C is probably a good place to start; you can find loads of books on the topic, and it’s a problem that’s been solved. Building a compiler is a good way to start on this path. Writing an NLP is much harder. We’ve been trying to do it for decades, and we’re still a long way from success.
It’s just not feasible. Like digging the channel tunnel with a penknife…
You might be able to create a fluent interface, but that’s about it. Remember the sort of thing you used to get in old text adventure games?
Before you go into this subject, understand the limitations of PHP. Languages such as Python are probably best suited for this task. However, thats not to say its not possible. You need to wrap your head around various AI paradigms and neural networks. May I suggest taking some lectures on the topic? People have built careers on this subject, I honestly don’t believe you can create what you have described, without thoroughly understanding the topic in question.
You would require a strong CS background and more notably, certain subjects such as Linear Algebra, Machine Learning, Data Structures and statistics to some extent. The following in an excerpt from the Stanford lectures on Machine learning
Students are expected to have the following background: Knowledge of basic computer science principles and skills, at a level sufficient to write a reasonably non-trivial computer program. Familiarity with the basic probability theory. Familiarity with the basic linear algebra.
The course uses Matlab and/or Octave. It also recommends the following readings:
I know, but rewriting my blog software all of the time is getting boring
Not that I will venture on this project now. I’m only gaining info ect…
Maybe you know of an application that pushes PHP to its limits? I’m really wondering on what has been pushed out of it.
But in Theory, you say that one who has the knowledge about the subject could write it in PHP?
The idea is to bring some of these technologies closer to the general public. That way they know what is going in those fields. Instead of just a few select who come in contact with them. So why not create a talking website. A site accessible by all, and when they go there people will be able to “talk” to a site.
So you say it can only be done through Declarative programming languages :sick:
No, what can be done in Prolog or Scheme can also be done in PHP, C or Java. Sometimes it’s easier sometimes it’s harder. There’s a reason that there are different paradigms.
Considering the complexity of the topics I would suggest you use the best tool available for the job.
PHP is a general all-rounder. It is unbeaten in the world of the web, because that’s where it belongs.
I’m not entirely sure what you mean by your question here, Fristi. What I get from the general gist of this conversation is that you mean basing a programming language on PHP, but with, for example, English as the language?
If so, that would be insanely hard to accomplish, and to be honest PHP is pretty high level as it is. The problem with a level THAT high in a computer language would be ambiguity.
For example, look at a dictionary for many words. I believe the word with the most definitions in the English dictionary is ‘set’. One of the most common words in programming (related to variables, constants, other values).
Of course, I probably have the wrong end of the stick here, so can you post something similar to what you want to accomplish and I’m sure you’ll get a very detailed response from us fellow members :).