1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP for Part of speech - Export text`s noun, verb, adjective...

Discussion in 'PHP' started by trecords, Feb 29, 2012.

  1. #1
    Hi,

    I need a php class which will separate sentence into noun, verb, adjective. May be array export or something else but code have to determine every word role in sentence. please, tell me if you know such script, code or class what ever you heard.

    Thanks.
     
    trecords, Feb 29, 2012 IP
  2. trendint

    trendint Peon

    Messages:
    52
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Natural language processing is a very complicated subject and not something easily achievable in PHP, and even with a half-decent natural language processor available you would be heavily constrained to the speed of PHP itself. While PHP is good for web development, it is not suited for this task.

    Following is a list of NLP toolkits that you could potentially interface with to get the desired results - but it wouldn't be pure PHP:

    http://en.wikipedia.org/wiki/List_of_natural_language_processing_toolkits
     
    trendint, Feb 29, 2012 IP
  3. Andre91

    Andre91 Peon

    Messages:
    197
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    0
    #3
    Dude, that's some serious AI you're asking for there. I doubt there even exists a program that gets this correct 100% of the times. I'd love to see someone do such in PHP. Next, I'll hear about robots being programmed using PHP :)
     
    Andre91, Feb 29, 2012 IP
  4. trendint

    trendint Peon

    Messages:
    52
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
  5. trecords

    trecords Well-Known Member

    Messages:
    145
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #5
    I agree with you that it is not suits within PHP abilities, but seems like I found something here:
    http://phpir.com/part-of-speech-tagging
    very simple solution, and sure not works always, but I think I found what I need :D
     
    trecords, Mar 1, 2012 IP