Skip to content

Instantly share code, notes, and snippets.

View XiaoxiaLei's full-sized avatar
💭
I may be slow to respond.

Xiaoxia Lei XiaoxiaLei

💭
I may be slow to respond.
View GitHub Profile
@XiaoxiaLei
XiaoxiaLei / gist:b585433d15932e9e224b9868a420602c
Created January 18, 2024 22:23 — forked from entaroadun/gist:1653794
Recommendation and Ratings Public Data Sets For Machine Learning

Movies Recommendation:

Music Recommendation:

@XiaoxiaLei
XiaoxiaLei / TextRank源码笔记
Created August 17, 2018 02:58 — forked from rsarxiv/TextRank源码笔记
TextRank源码笔记
TextRank源码笔记
更多
TextRank代码版本是(https://github.com/davidadamojr/TextRank.git),基于2004年一篇用graph model做文本中单词、句子排序的paper。
TextRank主要功能是提取关键短语(keyphrases extraction)和文本摘要(summarization)。
1、keyphrases extraction
(1)将文本分词,并用词性进行过滤。这里使用nltk pos_tag留下了词表中的NN,NNP(名词),JJ(形容词)作为候选词。
@XiaoxiaLei
XiaoxiaLei / TextTeaser源码阅读笔记
Created July 12, 2018 06:29 — forked from rsarxiv/TextTeaser源码阅读笔记
TextTeaser源码阅读笔记
一共三个class,TextTeaser,Parser,Summarizer。
1、TextTeaser,程序入口类。给定待摘要的文本和文本题目,输出文本摘要,默认是原文中最重要的5句话。
2、Summarizer,生成摘要类。计算出每句话的分数,并按照得分做排序,然后按照原文中句子的顺序依次输出得分最高的5句话作为摘要。
关键在于如何计算句子的得分,打分模型分为四个部分:
1)句子长度,长度为20的句子为最理想的长度,依照距离这个长度来打分。