Easy to Create Automatic Luhn Summarizer

Too much data. But, too little time to study. If you need to get a summary of long text to study, this article give you a tool to summarize long article using Luhn summary methodology. That is automated by using python and sumy.

In this article, we’re going to look at three step to help you get a tool to get luhn summary of long text. in quickly, and easily. Because, it uses computer to do.

Luhn summary is one method to summarize based on TF IDF and looking at the windows size of non important word between high important. It also assigns higher weights to sentences occurring near the beginning of a document.The text summarization algorithms was published in 1958 by Hans Peter Luhn, working at IBM research.

First, we’re has to install pyhon.
Next, we’re install a python library, sumy.
Finally, we are finish up with using code and also long text to summarize. .
After reading this article, you’ll have tool,a luhn method to summary. You can do itu whenever and for whatever for free.

First, let’s talk about how to install python.
Python is programming language that you need to create luhn summary.It is not the only option, it is one of several programming language, c+, php, java, javascript. But this tutorial is about luhn summarizer using python. How to install python is by download python installer from python.org. Then click the installer. For further detail to installation, click here.
This paragragh didnt give you detail tutorial, but the link give you complete detail to install python. After you install python, go to the next step.

“Next, we will tell you about install sumy. Sumy is python library that give you programming language to summarize text in several methods. We didnt reinvent the whell to program summarizer. Sumy is one of several summarizer in github. We can install it by open terminal (linux/mac) / command prompt (windows). Type pip install sumy, the your computer install sumy, if you have internet connection.

If your computer can not install by using pip in command prompt or terminal, you can download it in … then open setup.py file in command prompt.

After you install sumy, finally, run the program by using this small code. Copy the code below and paste in notepad. Then save as the file with py extension. Do not use default txt extension. For example, you save code in file luhn.py in folder “sumy folder”.

#Import library essentials
from sumy.parsers.plaintext import PlaintextParser #We're choosing a plaintext parser here, other parsers available for HTML etc.
from sumy.nlp.tokenizers import Tokenizer 
from sumy.summarizers.luhn import LuhnSummarizer #We're choosing Luhn, other algorithms are also built in

file = "source.txt" #name of the plain-text file
parser = PlaintextParser.from_file(file, Tokenizer("english"))
summarizer_luhn = LuhnSummarizer()

summary = summarizer_luhn(parser.document, 5) #Summarize the document with 5 sentences

for sentence in summary:
    print sentence

Then the next steps is create blank notepad file. It name source.txt. Why, because the code call it source.txt. If you want to change name, you has to change code.

Then copy long text that you want to summarize. Then after that, open luhn.py by using python IDLE. It is my article about python IDLE.
Then you get summary of the long text.

“That is three step to create a summarize tool by using python and sumy. Step one is about install python. Step two is about install sumy, after you install python. Then activate sumy by using code. Then you can enjoy summarizer tool by luhn method. You get summary of long text that you want to learn and extract. ”

Why Lauterborn Change Marketing Mix?

According to Philip Kotler, Marketing Mix still a king in the internet era. Now, it is challenged.

The McCarthy marketing mix is so popular. Many marketing study or economic management teach the marketing mix to their students.

In 1990, it is time that internet begin, Bob Lauterbon show the problem of marketing mix and give solution.

We will tell you points that Lauterborn said about marketing mix. Today marketing world is different. The marketing mix is not enough to face it.

Bob Lauterborn admit that marketing mix of Jerome McCarthy and Philip Kotler is great ideas. After World War II, production system increase and ready to provide to the customer. It is a big production that needs to sell to the big market. Then marketing mix give actionable framework to sell the mass product. McCarthy tells about internal organization factor of marketing in memorable phrase and acronym, marketing mix 4P. It is Product, Price, Place, and Promotion. In Lauterborn term,

Roaring out of World War II with a cranked-up production system ready to feed a lust for better living, American business linked management science to the art of mass marketing and rocketed to the moon.

Marketing mix using mass media to promote then taught cunsumptive culture.

The Problem of 4P Marketing Mix

But, then the domination of mass media is over. Domination of the internet begin since about 2000 and create a new market character. Desperately, some marketers still try to make the formula work. The industry still creates 12,000 new products across the shelves in a single year. But there are 20% market accepts and sustainable. Majority of products are failing.

The workflow of business is like this. Producer create products, give a price, deliver on shop or retail and promote it to customer. They didnt consider whether customers are easy or difficult to accept. When products are difficult to accept, then persuasion in advertising or promotion has a job.

But, market refuse so much new products. What is wrong?

Bob Lauterbord said, You can’t sell whatever you can make any more. It is time to learn what market need, want and expectation first, then create products that suit.

Customer Value

Forget Products, study customer needs and want. Feeding Frenzy is over. The feeding frenzy is game about fish that eat whatever small fish that in the front of them. The market is not a feeding frenzy that eats everything. The market is more selective to accept feeding. You can’t sell whatever you can make any more. You can only sell what someone specifically wants to buy.

The customer value is something that avoid customer hassle and something that make them happy.

Cost

Forget price. Understand the constunefs cost to satisfy that want or need. price is not the only component of customer cost. Customer cost include: risk, guilt, durability, time and space to buy and use. Price is only one between many component of cost for customer.

Convenience to buy

Forget place, thin convenience to buy. Place is not absolute necessary. In the era of internet, if people get value without go to somewhere, that is better.

Communication


Forget promotion, it is communication. Communication is a dialog, and promotion is monolog. Promotion is manipulative. Oh no, not always, but promotion is one way or not interactive communication. Two-way communication provides feedback from the customer to the producer.

In bridge message, Bob Lauterborn said, product, price, place and promotion are over. Consumer wants and needs, cost to satisfy, convenience to buy and communication are the catechism for our times.

What are different? The different are 4C of Lauterborn emphasis on customer perspective. While 4 P of Jerome McCarthy emphasis on seller perspective. To persuade customer, it is important to understand their perspective.

Create Your Own LSA Text Summarizer Python

If you need to read long book or article, but you have no time, summarizer will help. It helps if you have no option to get a summary of the text. The first option, you get a summary that created by a human. You can google the summary of the book. But if you didnt get summary that you want, summary machine can help you. I already explain how to create summarizer using luhn and lexrank, in this article I will talk about LSA method to summary. LSA is Latent Semantic Analysis, a computerized based summarization algorithms.

In this article, you can learn how to create summarizer by using lsa method. It is automate process by using python and sumy. I will tell you below, about three process to create lsa summarizer tool.

Lsa summary is One of the newest methods. It is the Latent Semantic Analysis (LSA). An LSA-based summarization using algorithms to create summary for long text.

How to make LSA summary.

First, we have to install a programming language, python.
Next, we’re installing an open source python library, sumy.
Finally, we can finish up with using small code that ready to work.
By reading this article, you can get tool ,a LSA method to summary. You can do itu whenever and for whatever for free.

First, we do first step, install python programming language. Python is a programming language that help us to give a set of instruction to computer.

Python is programming language that you need to create lsa summary.You have another option to create luhn summarizer, but this article give you tutorial to create lsa summarizer using python. Why ? because of I more familiar with this language than another language, like c+, php, java, javascript. How to install python is by download python installer from python.org. Then click the installer. For further detail to installation, click here. This paragraph didn’t give you detail tutorial, but the link gives you complete detail to install python. After you install python, go to the next step.

“Next, we will install a python library that suit to summarize, especially lsa summarizer. It is sumy. Sumy is python library that give you programming language to summarize text in several methods. The methods is lexrank, luhn, lsa, et cetera. We didnt reinvent the whell to program summarizer. We can use Sumy. It is one of several summarizer in github. We can install it by open terminal (linux/mac) / command prompt (windows). Type pip install sumy, the your computer install sumy, if you have internet connection.

If your computer can not install by using pip in command prompt or terminal, you can download it in … then open setup.py file in command prompt.

After you install sumy, finally, run the program by using this small code. Copy the code below and paste in notepad. Then save as the file with py extension. Do not use default txt extension. For example you save code in file lsa.py in folder “sumy folder”.

Then the next steps is create blank notepad file. It name source.txt. Why, because the code call it source.txt. If you want to change name, you has to change code.

#Import library essentials
from sumy.parsers.plaintext import PlaintextParser #We're choosing a plaintext parser here, other parsers available for HTML etc.
from sumy.nlp.tokenizers import Tokenizer 
from sumy.summarizers.lsa import LsaSummarizer #We're choosing Luhn, other algorithms are also built in

file = "source.txt" #name of the plain-text file
parser = PlaintextParser.from_file(file, Tokenizer("english"))
summarizer_lsa = LsaSummarizer()

summary_2 =summarizer_lsa(parser.document,5) #Summarize the document with 5 sentences

for sentence in summary_2:
    print sentence

Then copy long text that you want to summarize. Then after that, open lsa.py by using python IDLE. It is my article about python IDLE.
Then you get a summary of the long text.

“That is three step to create a lsa summarize tool by using python and sumy. Step one is about install python. Step two is about install sumy, after you install python. Then activate sumy by using code to activate lsa methods to summarize. Then you can enjoy summarizer tool by lsa method. You get summary of long text that you want to learn and extract. ”

Imagine You have a tool to summarize a long text (it is tested)

Overwhelming digital text on the internet. So much time to read even selected text. Imagine you have a tool to summarize and you can learn faster. Fortunately, python programming can help to summarize long text into small text. There are several methods to summarize. There are Luhn, Lexrank Edmundson, Latent Semantic Analysis, LSA, TextRank, Sumbasic, KL Sum. They have a different method to get the most important sentence in the text.

One of them is LexRank. It is a graph-based algorithm to identify the most important sentences. The algorithm uses a similarity function between different sentences. It uses a pre-defined threshold to build the graph of the documents, creating an edge between 2 sentences(nodes) every time the similarity is above the threshold. They also used a Pagerank-like scheme to rank the sentences(nodes).

In this article, we’re going to look at three steps to help you use this tool to get a summary of the text. Even, if you have no experience with python, you can do it.
First, we install python.
Next, install summy library.
Finally, we use a script and text file to make python and summy work.
.

Install Python Programming Language

First, let’s talk about how to install python.
To Install python, we download python installer then install it in desktop or personal computer.
Where is python installer? Go to this link https://www.python.org/.
Then, find download in the menu, you will get download link.
Klik download link. Choose download link that suit to your own computer type. If your computer is apple, choose python installer for mac. If your computer using windows operating system, choose python for windows. If your computer using linux, usually you has your own python. It is pre built program if you have linux.

After download, click and install. Click agree, next and yes. If you already success to install, you can test by using prompt. Open prompt, then type python, if prompt command show python version number and also introduction, you are success to install.

Install Sumy, a Python Library

Next step, after install python, we will install Sumy. Sumy is a python library that has a function to summarize the long text. Okay, to install Sumy we go to command prompt (windows), or terminal (mac and Linux). Then type this code “pip install sumy”. Then click enter on the keyboard. Wait until finished. If you already success to install sumy, you can test it by type python on command prompt/terminal, then type import sumy. If command prompt does not give an error message, if the prompt give you blank next line, you are successful.

Write Code to run Sumy

Finally, we write code to make sumy work. Copy this code below on notepad,
and save as lexrank.py. Dont save as txt, save it as py in a folder. It is code from http://dataexperiments.net/tag/summarization/

#Import library essentials

from sumy.parsers.plaintext import PlaintextParser #We're choosing a plaintext parser here, other parsers available for HTML etc.
from sumy.nlp.tokenizers import Tokenizer 
from sumy.summarizers.lex_rank import LexRankSummarizer #We're choosing Lexrank, other algorithms are also built in

file = "source.txt" #name of the plain-text file
parser = PlaintextParser.from_file(file, Tokenizer("english"))
summarizer = LexRankSummarizer()

summary = summarizer(parser.document, 5) #Summarize the document with 5 sentences

for sentence in summary:
    print sentence

Create a file in notepad, and give name source.txt. Copy the text that you want to summarize, paste in that file in same folder where lexrank.py file is located.

Open IDLE python program, and by using this program, open file lexrank.py. Run program on IDLE. Then you will get top 5 most important sentences. It is explanation about IDLE Python.

If you want to change number of words, change number in this code below in the lexrank.py file. Change 5 to whatever number you want.
summary = summarizer(parser.document, 5)

Now, you already have tools to summarize long text. You already do three steps to create the tool, install python, install sumy and write and run code. Finally, You will able to create tool to summarize text.