5

I'm currently building a system, which will summarize a article from a webpage like Wikipedia.

I'm able to extract texts from web pages, and I know that the Open Text Summarizer API can help me to do summarization, but the problem is I don't know how to use it properly.

Please anyone who happen to know how to use this library? Can you provide a simple example for me? Currently I'm doing my project in C#.

Mario
  • 35,726
  • 5
  • 62
  • 78
Alex Chu
  • 55
  • 1
  • 5

1 Answers1

4

There is a lot of examples in codeplex. Did you read it ?

Well, here a sample from the Winform demo :

SummarizerArguments sumargs = new SummarizerArguments
                                          {
                                              DictionaryLanguage = "en",
                                              DisplayLines = sentCount,
                                              DisplayPercent = 0,
                                              InputFile = "",
                                              InputString = OriginalTextBox.Text // here your text
                                          };
SummarizedDocument doc = Summarizer.Summarize(sumargs);
string summary = string.Join("\r\n\r\n", doc.Sentences.ToArray());
// do some stuff with summary. It is your result.
aloisdg
  • 22,270
  • 6
  • 85
  • 105
  • by the way, if I want to summarize the article based on how many ratio, is that any open source that able to do it in C#? – Alex Chu Feb 18 '14 at 15:08
  • Ya is it a way to do so? – Alex Chu Feb 18 '14 at 15:34
  • Did you try to change the value of `DisplayPercent` ? (10% by default) – aloisdg Feb 18 '14 at 16:08
  • ya i set DisplayPercent=30, seems like this function does not work well on input string, do u know how to make it work? – Alex Chu Feb 19 '14 at 18:40
  • @aloisdg I'm not sure if the site has changed in the last few months or I'm blind, but on the site you linked for examples which I've already visited, doesn't seem to have a single example. There is no documentation or anything. – Vereonix Jan 04 '15 at 18:24
  • @Tom You are blind or you are not looking at the right place. There are examples in the source code. [Check this](http://ots.codeplex.com/SourceControl/latest#trunk/OTSApp/Form1.cs) – aloisdg Jan 04 '15 at 21:10
  • @aloisdg Ah thank you, I've never used CodePlex before, the navigation n' all is new to me, I thought examples would be under documentation or a separate area. – Vereonix Jan 04 '15 at 22:19