Comparing Built-in Newspaper3k NLP Summarization vs. AI-based Summarization (Gemini/ChatGPT)
By hientd, at: March 22, 2025, 7:06 p.m.
Estimated Reading Time: __READING_TIME__ minutes


When working with article scraping and content summarization, developers often encounter two popular approaches: built-in NLP summarization provided by packages like Newspaper3k and advanced AI-based summarization using powerful APIs such as ChatGPT or Gemini.
1. Built-in NLP summarization (Newspaper3k)
Newspaper3k provides a straightforward, keyword-frequency-based summarization method. It extracts key sentences from the article based primarily on frequency and relevancy without fully understanding context.
Strengths:
-
Quick and efficient, no external API calls.
-
Free and built-in to Newspaper3k.
-
Good for basic or preliminary summarization tasks.
Weaknesses:
-
Limited accuracy and depth.
-
Summaries often lack natural flow.
-
Not suitable for high-quality content production.
Example using Newspaper3k:
from newspaper import Article
url = "https://abcnews.go.com/International/putin-prolonging-ukraine-war-zelenskyy-after-trump-peace/story?id=119845834"
article = Article(url)
article.download()
article.parse()
article.nlp()
print("Built-in NLP Summary:")
print(article.summary)
#############
On Saturday, Zelenskyy reported a massing of Russian troops along the border with Ukraine's eastern Sumy region.
We are ready to provide our partners with all the real information on the situation at the front, in the Kursk region and along our border."
Yuri Gripas/Pool/EPA-EFE/ShutterstockZelenskyy, his officials and commanders denied the suggestion that Ukrainian troops were cut off.
"Our troops continue to hold back Russian and North Korean groupings in the Kursk region," Zelenskyy wrote on social media on Saturday.
"And in this situation we can view it as a sort of attempt to give time to Ukrainian troops time to rearm and regroup."
AI-based Summarization with Gemini or ChatGPT
AI-powered summarization services like Google's Gemini or OpenAI's ChatGPT utilize advanced transformer models capable of deep contextual understanding, generating summaries that feel natural and human-written.
Strengths:
-
Produces highly accurate and contextually relevant summaries.
-
Human-like readability and coherence.
-
Customizable for tone, length, and specificity.
Weaknesses:
-
Requires API access and can incur costs.
-
Dependent on internet connection and API latency.
Example code using OpenAI ChatGPT:
from newspaper import Article
from openai import OpenAI
from decouple import config
api_key = config('OPENAI_API_KEY')
client = OpenAI(api_key=api_key)
def ai_summarize(text):
prompt = f"Summarize this article in 3 concise sentences:\n\n{text}"
response = client.chat.completions.create(
model="gpt-3.5-turbo",
messages=[{"role": "user", "content": prompt}],
max_tokens=100,
temperature=0.3,
)
return response.choices[0].message.content.strip()
#############
Ukrainian President Zelenskyy accused Vladimir Putin of deliberately prolonging the war in Ukraine by setting unrealistic conditions for peace talks, responding to a ceasefire proposed by former U.S. President Trump. Zelenskyy affirmed Ukraine’s readiness for peace, criticizing Russia’s stance as an intentional tactic to delay diplomatic resolutions. Meanwhile, both Russian and Ukrainian forces continue intensive aerial attacks, escalating military tensions despite diplomatic efforts from Western allies to secure a ceasefire.
Practical Comparison
Feature | Newspaper3k NLP | ChatGPT / Gemini API |
---|---|---|
Quality | Moderate | High (Human-like) |
Performance | Fast | API Dependent (Moderate) |
Cost | Free | Usage-based |
Use-case | Simple tasks | Professional-grade summaries |
Conclusion
For basic summarization needs or quick previews, Newspaper3k’s built-in NLP summarizer is convenient. However, for professional, in-depth, and human-like summaries suitable for marketing, SEO, reporting, or detailed analytics, integrating an AI service like ChatGPT or Gemini significantly enhances quality and accuracy.