给定一段英文文本和一个单词，要求在文本中查找该单词，并替换为另一个给定的单词。
This is a sample text to test the instruction with a word to replace. Replace "text" with "sentence".
This is a sample sentence to test the instruction with a word to replace. Replace "text" with "sentence".