One or more computer-readable media having computer-executable instructions embodied thereon for performing a method of expanding and indexing semantic relationships between words within a sentence, the method comprising: receiving a first electronic document having content that includes text; breaking the text into one or more sentences; determining a first role for a word in the sentence, wherein the first role is a type of semantic relationship to other words in the sentence; determining that the word has more than one potential role; assigning a second role to the word, wherein the second role is a type of semantic relationship to other words in the sentence, and wherein the second role is one of the more than one potential role; storing the word with the first role and the second role in an inverted index that associates the word and the sentence with the first electronic document; receiving the search query containing the word; determining that the word is used in the first role within the search query; determining that the word has more than one potential role within the search query; assigning a third role to the word; searching the inverted index to find one or more electronic documents having the word used in one or more of the first role and the third role; determining the first electronic document is a first match to the search query; determining a second electronic document having the word assigned to the first role and the third role is a second match to the search query; and ranking the second electronic document as a better match to the search query than the first electronic document because the second electronic document has the word in the same roles that are assigned to the word in the search query. receiving a first electronic document having content that includes text; breaking the text into one or more sentences; determining a first role for a word in the sentence, wherein the first role is a type of semantic relationship to other words in the sentence; determining that the word has more than one potential role; assigning a second role to the word, wherein the second role is a type of semantic relationship to other words in the sentence, and wherein the second role is one of the more than one potential role; storing the word with the first role and the second role in an inverted index that associates the word and the sentence with the first electronic document; receiving the search query containing the word; determining that the word is used in the first role within the search query; determining that the word has more than one potential role within the search query; assigning a third role to the word; searching the inverted index to find one or more electronic documents having the word used in one or more of the first role and the third role; determining the first electronic document is a first match to the search query; determining a second electronic document having the word assigned to the first role and the third role is a second match to the search query; and ranking the second electronic document as a better match to the search query than the first electronic document because the second electronic document has the word in the same roles that are assigned to the word in the search query. <EOS>