I have two lists originating from a part of speech tagger which look as follows:
pos_tags = [('This', u'DT'), ('is', u'VBZ'), ('a', u'DT'), ('test', u'NN'), ('sentence', u'NN'), ('.', u'.'), ('My', u"''"), ('name', u'NN'), ('is', u'VBZ'), ('John', u'NNP'), ('Murphy', u'NNP'), ('and', u'CC'), ('I', u'PRP'), ('live', u'VBP'), ('happily', u'RB'), ('on', u'IN'), ('Planet', u'JJ'), ('Earth', u'JJ'), ('!', u'.')]
pos_names = [('John', 'NNP'), ('Murphy', 'NNP')]
I want to create a final list which updates pos_tags with the list items in pos_names. So basically I need to find John and Murphy in pos_tags and replace the POS tag with NNP.