의 배열에 가장 적합한 문장을 찾아 나는이 텍스트 마이닝에 대해 다음 DataFrame : 토큰의토큰
df = pd.DataFrame({'text':["Anyone who reads Old and Middle English literary texts will be familiar with the mid-brown volumes of the EETS, with the symbol of Alfreds jewel embossed on the front cover",
"Most of the works attributed to King Alfred or to Aelfric, along with some of those by bishop Wulfstan and much anonymous prose and verse from the pre-Conquest period, are to be found within the Society's three series",
"all of the surviving medieval drama, most of the Middle English romances, much religious and secular prose and verse including the English works of John Gower, Thomas Hoccleve and most of Caxton's prints all find their place in the publications",
"Without EETS editions, study of medieval English texts would hardly be possible."]})
text
0 Anyone who reads Old and Middle English litera...
1 Most of the works attributed to King Alfred or...
2 all of the surviving medieval drama, most of t...
3 Without EETS editions, study of medieval Engli...
그리고 내가 가지고있는 목록 :
tokens = [['middl engl', 'mid-brown', 'symbol'], ["king", 'anonym', 'series'], ['mediev', 'romance', 'relig'], ['hocclev', 'edit', 'publ']]
내가 가장을 찾기 위해 노력하고있어 위의 토큰 목록의 토큰 배열에 적합한 문장.
업데이트 : 자세한 내용은 내 문제를 설명하도록 요청 받았습니다.
문제는 내가 영어가 아닌 텍스트를 사용하고 있기 때문에 문제를 좀 더 설명하기가 어렵다는 것입니다.
나는 df.text
에 문장을 내 토큰의 입력으로 목록을 각 요소를 가져 및 토큰 목록의 각 요소에 대해, 그것은 (어쩌면 일부 메트릭 의미에서) 가장 적합한 검색 일부 기능 X를 찾고 있어요. 이것은 출력이 중요하지 않다는 주요 아이디어입니다. 난 그냥 일하고 싶어요 :)
또한 문제에 대해 좀 더 설명하고 예상되는 출력을 추가 할 수 있습니까? –
문장과 토큰 목록 간의 유사성을 계산하고 토큰 목록의 가장 비슷한 문장을 출력 문장으로 선택합니다. 또는 문장에서 각 토큰 목록의 토큰 발생을 계산하는 간단한 방법은 토큰 목록 출력으로 최대 토큰 발생 문장을 선택하는 것입니다. – mutux