Automatic Tagging (eg Tagging Statuses with Friends on Facebook)

I was wondering if there was a way for ousystems to automatically tag words in a sentence that a user inputs in an input box - similar to how on facebook if you begin writing someone's name, it automatically recognises the name and suggests completions it for you.