public LexRank_Continuous(LexRank_CosineMatrix CosineMatrixInfo) { Data = CosineMatrixInfo; StochasticMatrix = new double[Data.MatrixSize][]; for (int i = 0; i < Data.MatrixSize; i++) { StochasticMatrix[i] = new double[Data.MatrixSize]; } StiffStochasticMatrix(); LexRankScores = GetLexRankScores(); Normalization(); }
public LexRank_PowerMethod(LexRank_CosineMatrix CosineMatrixInfo, double theThreshold) { Data = CosineMatrixInfo; Threshold = theThreshold; StochasticMatrix = new double[Data.MatrixSize][]; for (int i = 0; i < Data.MatrixSize; i++) { StochasticMatrix[i] = new double[Data.MatrixSize]; } GetDegreeInfo(Threshold); StiffStochasticMatrix(); LexRankScores = GetLexRankScores(); Normalization(); }
static void Main(string[] args) { LexRank_BagOfWord BagOfWord = new LexRank_BagOfWord(@"C:\Users\Lian\Desktop\results\N07\"); //BagOfWord.ShowSentenceInfo(); LexRank_CosineMatrix CosineMatrix = new LexRank_CosineMatrix(BagOfWord); //CosineMatrix.PrintCosineMatrix(); LexRank_PowerMethod PowerMethod = new LexRank_PowerMethod(CosineMatrix, 0.1); //PowerMethod.ShowDegreeInfo(); //LexRank_Continuous Continuous = new LexRank_Continuous(CosineMatrix); //Continuous.ShowLexRankScores(); LexRank_TopicSentences TopicSentences = new LexRank_TopicSentences(BagOfWord.ListofSentences, PowerMethod.LexRankScores); //TopicSentences.ShowSentencesAndScores(); LexRank_PickTopicSentences PickTopicSentences = new LexRank_PickTopicSentences(BagOfWord.ListofSentences, CosineMatrix.CosineMatrix, TopicSentences.SortedSentences); //PickTopicSentences.ShowTopicThreePosition(); //PickTopicSentences.ShowSentencesOrder(); PickTopicSentences.PrintThreeSentences(); }