给定一个长文本和一个关键词，寻找文本中与关键词最相关的句子，并输出该句子及其所在段落。

长文本包括多个段落，如一篇研究论文。关键词为“人工智能”。
关键词为“人工智能”的相关句子及其所在段落可以通过以下步骤找到：
1. 遍历每个段落，将段落拆分成句子。
2. 对于每个句子，使用相关度计算方法（例如TF-IDF、词向量余弦相似度等）计算与关键词“人工智能”的相关度。
3. 找到相关度最高的句子，并输出该句子及其所在段落。

代码示例（使用Python和NLTK库）：

```
import nltk
# 下载停用词
nltk.download('stopwords')
# 加载停用词
stop_words = set(nltk.corpus.stopwords.words('english'))

# 长文本
text = """
In recent years, there has been a significant rise in interest in artificial intelligence (AI).
AI is a branch of computer science that seeks to create intelligent machines that can perform tasks
that normally require human intervention. There are a number of different approaches to AI, including
machine learning, deep learning, and natural language processing.
"""

# 关键词
keyword = "artificial intelligence"

# 将文本分成段落
paragraphs = text.split('
')

# 遍历每个段落，找到相关度最高的句子
max_score = 0
best_sentence = ""
best_paragraph = ""
for paragraph in paragraphs:
    # 将段落分成句子
    sentences = nltk.sent_tokenize(paragraph)
    for sentence in sentences:
        # 去除标点符号和停用词，并将句子转换成小写
        words = nltk.word_tokenize(sentence.lower())
        words = [word for word in words if word.isalnum() and word not in stop_words]
        # 计算与关键词的相关度（使用词向量余弦相似度）
        score = (nltk.word_tokenize(keyword.lower()) * words).sum() / (len(words) ** 0.5)
        # 更新最高相关度的句子和段落
        if score > max_score:
            max_score = score
            best_sentence = sentence
            best_paragraph = paragraph

# 输出相关度最高的句子及其所在段落
print("Best sentence:", best_sentence)
print("Best paragraph:", best_paragraph)
```