Is it possible to extract specific words from a sentence in Hindi/Marathi?
Based on your comment I understand that you want to identify a particular syntactic category of words, for instance nouns. The task which identifies these categories is called Part Of Speech (POS) tagging.
I'm not familiar with any specific resource for Hindi or Marathi but there are probably some software that you can use. From a quick search I found a few links below:

General resources for Indian languages
A POS tagger for Hindi
Another more recent POS tagger for Hindi