More on NFTs & Art

Stephen Moore
3 years ago
Trading Volume on OpenSea Drops by 99% as the NFT Boom Comes to an End
Wasn't that a get-rich-quick scheme?
OpenSea processed $2.7 billion in NFT transactions in May 2021.
Fueled by a crypto bull run, rumors of unfathomable riches, and FOMO, Bored Apes, Crypto Punks, and other JPEG-format trash projects flew off the virtual shelves, snatched up by retail investors and celebrities alike.
Over a year later, those shelves are overflowing and warehouses are backlogged. Since March, I've been writing less. In May and June, the bubble was close to bursting.
Apparently, the boom has finally peaked.
This bubble has punctured, and deflation has begun. On Aug. 28, OpenSea processed $9.34 million.
From that euphoric high of $2.7 billion, $9.34 million represents a spectacular decline of 99%.
OpenSea contradicts the data. A trading platform spokeswoman stated the comparison is unfair because it compares the site's highest and lowest trading days. They're the perfect two data points to assess the drop. OpenSea chooses to use ETH volume measures, which ignore crypto's shifting price. Since January 2022, monthly ETH volume has dropped 140%, according to Dune.
Unconvincing counterargument.
Further OpenSea indicators point to declining NFT demand:
Since January 2022, daily user visits have decreased by 50%.
Daily transactions have decreased by 50% since the beginning of the year in the same manner.
Off-platform, the floor price of Bored Apes has dropped from 145 ETH to 77 ETH. (At $4,800, a reduction from $700,000 to $370,000). Google search data shows waning popular interest.
It is a trend that will soon vanish, just like laser eyes.
NFTs haven't moved since the new year. Eminem and Snoop Dogg can utilize their apes in music videos or as 3D visuals to perform at the VMAs, but the reality is that NFTs have lost their public appeal and the market is trying to regain its footing.
They've lost popularity because?
Breaking records. The technology still lacks genuine use cases a year and a half after being popular.
They're pricey prestige symbols that have made a few people rich through cunning timing or less-than-savory scams or rug pulling. Over $10.5 billion has been taken through frauds, most of which are NFT enterprises promising to be the next Bored Apes, according to Web3 is going wonderfully. As the market falls, many ordinary investors realize they purchased into a self-fulfilling ecosystem that's halted. Many NFTs are sold between owner-held accounts to boost their price, data suggests. Most projects rely on social media excitement to debut with a high price before the first owners sell and chuckle to the bank. When they don't, the initiative fails, leaving investors high and dry.
NFTs are fading like laser eyes. Most people pushing the technology don't believe in it or the future it may bring. No, they just need a Kool-Aid-drunk buyer.
Everybody wins. When your JPEGs are worth 99% less than when you bought them, you've lost.
When demand reaches zero, many will lose.

Protos
3 years ago
Plagiarism on OpenSea: humans and computers
OpenSea, a non-fungible token (NFT) marketplace, is fighting plagiarism. A new “two-pronged” approach will aim to root out and remove copies of authentic NFTs and changes to its blue tick verified badge system will seek to enhance customer confidence.
According to a blog post, the anti-plagiarism system will use algorithmic detection of “copymints” with human reviewers to keep it in check.
Last year, NFT collectors were duped into buying flipped images of the popular BAYC collection, according to The Verge. The largest NFT marketplace had to remove its delay pay minting service due to an influx of copymints.
80% of NFTs removed by the platform were minted using its lazy minting service, which kept the digital asset off-chain until the first purchase.
NFTs copied from popular collections are opportunistic money-grabs. Right-click, save, and mint the jacked JPEGs that are then flogged as an authentic NFT.
The anti-plagiarism system will scour OpenSea's collections for flipped and rotated images, as well as other undescribed permutations. The lack of detail here may be a deterrent to scammers, or it may reflect the new system's current rudimentary nature.
Thus, human detectors will be needed to verify images flagged by the detection system and help train it to work independently.
“Our long-term goal with this system is two-fold: first, to eliminate all existing copymints on OpenSea, and second, to help prevent new copymints from appearing,” it said.
“We've already started delisting identified copymint collections, and we'll continue to do so over the coming weeks.”
It works for Twitter, why not OpenSea
OpenSea is also changing account verification. Early adopters will be invited to apply for verification if their NFT stack is worth $100 or more. OpenSea plans to give the blue checkmark to people who are active on Twitter and Discord.
This is just the beginning. We are committed to a future where authentic creators can be verified, keeping scammers out.
Also, collections with a lot of hype and sales will get a blue checkmark. For example, a new NFT collection sold by the verified BAYC account will have a blue badge to verify its legitimacy.
New requests will be responded to within seven days, according to OpenSea.
These programs and products help protect creators and collectors while ensuring our community can confidently navigate the world of NFTs.
By elevating authentic content and removing plagiarism, these changes improve trust in the NFT ecosystem, according to OpenSea.
OpenSea is indeed catching up with the digital art economy. Last August, DevianArt upgraded its AI image recognition system to find stolen tokenized art on marketplaces like OpenSea.
It scans all uploaded art and compares it to “public blockchain events” like Ethereum NFTs to detect stolen art.

Adrien Book
3 years ago
What is Vitalik Buterin's newest concept, the Soulbound NFT?
Decentralizing Web3's soul
Our tech must reflect our non-transactional connections. Web3 arose from a lack of social links. It must strengthen these linkages to get widespread adoption. Soulbound NFTs help.
This NFT creates digital proofs of our social ties. It embodies G. Simmel's idea of identity, in which individuality emerges from social groups, just as social groups evolve from people.
It's multipurpose. First, gather online our distinctive social features. Second, highlight and categorize social relationships between entities and people to create a spiderweb of networks.
1. 🌐 Reducing online manipulation: Only socially rich or respectable crypto wallets can participate in projects, ensuring that no one can create several wallets to influence decentralized project governance.
2. 🤝 Improving social links: Some sectors of society lack social context. Racism, sexism, and homophobia do that. Public wallets can help identify and connect distinct social groupings.
3. 👩❤️💋👨 Increasing pluralism: Soulbound tokens can ensure that socially connected wallets have less voting power online to increase pluralism. We can also overweight a minority of numerous voices.
4. 💰Making more informed decisions: Taking out an insurance policy requires a life review. Why not loans? Character isn't limited by income, and many people need a chance.
5. 🎶 Finding a community: Soulbound tokens are accessible to everyone. This means we can find people who are like us but also different. This is probably rare among your friends and family.
NFTs are dangerous, and I don't like them. Social credit score, privacy, lost wallet. We must stay informed and keep talking to innovators.
E. Glen Weyl, Puja Ohlhaver and Vitalik Buterin get all the credit for these ideas, having written the very accessible white paper “Decentralized Society: Finding Web3’s Soul”.
You might also like

Matthew O'Riordan
3 years ago
Trends in SaaS Funding from 2016 to 2022
Christopher Janz of Point Nine Capital created the SaaS napkin in 2016. This post shows how founders have raised cash in the last 6 years. View raw data.
Round size
Unsurprisingly, round sizes have expanded and will taper down in 2022. In 2016, pre-seed rounds were $200k to $500k; currently, they're $1-$2m. Despite the macroeconomic scenario, Series A have expanded from $3m to $12m in 2016 to $6m and $18m in 2022.
Valuation
There are hints that valuations are rebounding this year. Pre-seed valuations in 2022 are $12m from $3m in 2016, and Series B prices are $270m from $100m in 2016.
Compared to public SaaS multiples, Series B valuations more closely reflect the market, but Seed and Series A prices seem to be inflated regardless of the market.
I'd like to know how each annual cohort performed for investors, based on the year they invested and the valuations. I can't access this information.
ARR
Seed firms' ARR forecasts have risen from $0 to $0.6m to $0 to $1m. 2016 expected $1.2m to $3m, 2021 $0.5m to $4m, and this year $0.5m to $2.5m, suggesting that Series A firms may raise with less ARR today. Series B minutes fell from $4.2m to $3m.
Capitalization Rate
2022 is the year that VCs start discussing capital efficiency in portfolio meetings. Given the economic shift in the markets and the stealthy VC meltdown, it's not surprising. Christopher Janz added capital efficiency to the SaaS Napkin as a new statistic for Series A (3.5x) and Series B. (2.5x). Your investors must live under a rock if they haven't asked about capital efficiency. If you're unsure:
The Capital Efficiency Ratio is the ratio of how much a company has spent growing revenue and how much they’re receiving in return. It is the broadest measure of company effectiveness in generating ARR
What next?
No one knows what's next, including me. All startup and growing enterprises around me are tightening their belts and extending their runways in anticipation of a difficult fundraising ride. If you're wanting to raise money but can wait, wait till the market is more stable and access to money is easier.

Johnny Harris
3 years ago
The REAL Reason Putin is Invading Ukraine [video with transcript]
Transcript:
[Reporter] The Russian invasion of Ukraine.
Momentum is building for a war between Ukraine and Russia.
[Reporter] Tensions between Russia and the West
are growing rapidly.
[Reporter] President Biden considering deploying
thousands of troops to Eastern Europe.
There are now 100,000 troops
on the Eastern border of Ukraine.
Russia is setting up field hospitals on this border.
Like this is what preparation for war looks like.
A legitimate war.
Ukrainian troops are watching and waiting,
saying they are preparing for a fight.
The U.S. has ordered the families of embassy staff
to leave Ukraine.
Britain has sent all of their nonessential staff home.
And now the U.S. is sending tons of weapons and munitions
to Ukraine's army.
And we're even considering deploying
our own troops to the region.
I mean, this thing is heating up.
Meanwhile, Russia and the West have been in Geneva
and Brussels trying to talk it out,
and sort of getting nowhere.
The message is very clear.
Should Russia take further aggressive actions
against Ukraine the costs will be severe
and the consequences serious.
It's a scary, grim momentum that is unpredictable.
And the chances of miscalculation
and escalation are growing.
I want to explain what's going on here,
but I want to show you that this isn't just
typical geopolitical behavior.
Stuff that can just be explained on the map.
Instead, to understand why 100,000 troops are camped out
on Ukraine's Eastern border, ready for war,
you have to understand Russia
and how it's been cut down over the ages
from the Slavic empire that dominated this whole region
to then the Soviet Union,
which was defeated in the nineties.
And what you really have to understand here
is how that history is transposed
onto the brain of one man.
This guy, Vladimir Putin.
This is a story about regional domination
and struggles between big powers,
but really it's the story about
what Vladimir Putin really wants.
[Reporter] Russian troops moving swiftly
to take control of military bases in Crimea.
[Reporter] Russia has amassed more than 100,000 troops
and a lot of military hardware
at the border with Ukraine.
Let's dive back in.
Okay. Let's get up to speed on what's happening here.
And I'm just going to quickly give you the highlight version
of like the news that's happening,
because I want to get into the juicy part,
which is like why, the roots of all of this.
So let's go.
A few months ago, Russia started sending
more and more troops to this border.
It's this massive border between Ukraine and Russia.
They said they were doing a military exercise,
but the rest of the world was like,
"Yeah, we totally believe you Russia. Pshaw."
This was right before this big meeting
where North American and European countries
were coming together to talk about a lot
of different things, like these countries often do
in these diplomatic summits.
But soon, because of Russia's aggressive behavior
coming in and setting up 100,000 troops
on the border with Ukraine,
the entire summit turned into a whole, "WTF Russia,
what are you doing on the border of Ukraine," meeting.
Before the meeting Putin comes out and says,
"Listen, I have some demands for the West."
And everyone's like, "Okay, Russia, what are your demands?
You know, we have like, COVID19 right now.
And like, that's like surging.
So like, we don't need your like,
bluster about what your demands are."
And Putin's like, "No, here's my list of demands."
Putin's demands for the summit were this:
number one, that NATO, which is this big military alliance
between U.S., Canada, and Europe stop expanding,
meaning they don't let any new members in, okay.
So, Russia is like, "No more new members to your, like,
cool military club that I don't like.
You can't have any more members."
Number two, that NATO withdraw all of their troops
from anywhere in Eastern Europe.
Basically Putin is saying,
"I can veto any military cooperation
or troops going between countries
that have to do with Eastern Europe,
the place that used to be the Soviet Union."
Okay, and number three, Putin demands that America vow
not to protect its allies in Eastern Europe
with nuclear weapons.
"LOL," said all of the other countries,
"You're literally nuts, Vladimir Putin.
Like these are the most ridiculous demands, ever."
But there he is, Putin, with these demands.
These very, very aggressive demands.
And he sort of is implying that if his demands aren't met,
he's going to invade Ukraine.
I mean, it doesn't work like this.
This is not how international relations work.
You don't just show up and say like,
"I'm not gonna allow other countries to join your alliance
because it makes me feel uncomfortable."
But what I love about this list of demands
from Vladimir Putin for this summit
is that it gives us a clue
on what Vladimir Putin really wants.
What he's after here.
You read them closely and you can grasp his intentions.
But to grasp those intentions
you have to understand what NATO is.
and what Russia and Ukraine used to be.
(dramatic music)
Okay, so a while back I made this video
about why Russia is so damn big,
where I explain how modern day Russia started here in Kiev,
which is actually modern day Ukraine.
In other words, modern day Russia, as we know it,
has its original roots in Ukraine.
These places grew up together
and they eventually became a part
of the same mega empire called the Soviet Union.
They were deeply intertwined,
not just in their history and their culture,
but also in their economy and their politics.
So it's after World War II,
it's like the '50s, '60s, '70s, and NATO was formed,
the North Atlantic Treaty Organization.
This was a military alliance between all of these countries,
that was meant to sort of deter the Soviet Union
from expanding and taking over the world.
But as we all know, the Soviet Union,
which was Russia and all of these other countries,
collapsed in 1991.
And all of these Soviet republics,
including Ukraine, became independent,
meaning they were not now a part
of one big block of countries anymore.
But just because the border's all split up,
it doesn't mean that these cultural ties actually broke.
Like for example, the Soviet leader at the time
of the collapse of the Soviet Union, this guy, Gorbachev,
he was the son of a Ukrainian mother and a Russian father.
Like he grew up with his mother singing him
Ukrainian folk songs.
In his mind, Ukraine and Russia were like one thing.
So there was a major reluctance to accept Ukraine
as a separate thing from Russia.
In so many ways, they are one.
There was another Russian at the time
who did not accept this new division.
This young intelligence officer, Vladimir Putin,
who was starting to rise up in the ranks
of postSoviet Russia.
There's this amazing quote from 2005
where Putin is giving this stateoftheunionlike address,
where Putin declares the collapse of the Soviet Union,
quote, "The greatest catastrophe of the 20th century.
And as for the Russian people, it became a genuine tragedy.
Tens of millions of fellow citizens and countrymen
found themselves beyond the fringes of Russian territory."
Do you see how he frames this?
The Soviet Union were all one people in his mind.
And after it collapsed, all of these people
who are a part of the motherland were now outside
of the fringes or the boundaries of Russian territory.
First off, fact check.
Greatest catastrophe of the 20th century?
Like, do you remember what else happened
in the 20th century, Vladimir?
(ominous music)
Putin's worry about the collapse of this one people
starts to get way worse when the West, his enemy,
starts showing up to his neighborhood
to all these exSoviet countries that are now independent.
The West starts selling their ideology
of democracy and capitalism and inviting them
to join their military alliance called NATO.
And guess what?
These countries are totally buying it.
All these exSoviet countries are now joining NATO.
And some of them, the EU.
And Putin is hating this.
He's like not only did the Soviet Union divide
and all of these people are now outside
of the Russia motherland,
but now they're being persuaded by the West
to join their military alliance.
This is terrible news.
Over the years, this continues to happen,
while Putin himself starts to chip away
at Russian institutions, making them weaker and weaker.
He's silencing his rivals
and he's consolidating power in himself.
(triumphant music)
And in the past few years,
he's effectively silenced anyone who can challenge him;
any institution, any court,
or any political rival have all been silenced.
It's been decades since the Soviet Union fell,
but as Putin gains more power,
he still sees the region through the lens
of the old Cold War, Soviet, Slavic empire view.
He sees this region as one big block
that has been torn apart by outside forces.
"The greatest catastrophe of the 20th century."
And the worst situation of all of these,
according to Putin, is Ukraine,
which was like the gem of the Soviet Union.
There was tons of cultural heritage.
Again, Russia sort of started in Ukraine,
not to mention it was a very populous
and industrious, resourcerich place.
And over the years Ukraine has been drifting west.
It hasn't joined NATO yet, but more and more,
it's been electing proWestern presidents.
It's been flirting with membership in NATO.
It's becoming less and less attached
to the Russian heritage that Putin so adores.
And more than half of Ukrainians say
that they'd be down to join the EU.
64% of them say that it would be cool joining NATO.
But Putin can't handle this. He is in total denial.
Like an exboyfriend who handle his exgirlfriend
starting to date someone else,
Putin can't let Ukraine go.
He won't let go.
So for the past decade,
he's been trying to keep the West out
and bring Ukraine back into the motherland of Russia.
This usually takes the form of Putin sending
secret soldiers from Russia into Ukraine
to help the people in Ukraine who want to like separate
from Ukraine and join Russia.
It also takes the form of, oh yeah,
stealing entire parts of Ukraine for Russia.
Russian troops moving swiftly to take control
of military bases in Crimea.
Like in 2014, Putin just did this.
To what America is officially calling
a Russian invasion of Ukraine.
He went down and just snatched this bit of Ukraine
and folded it into Russia.
So you're starting to see what's going on here.
Putin's life's work is to salvage what he calls
the greatest catastrophe of the 20th century,
the division and the separation
of the Soviet republics from Russia.
So let's get to present day. It's 2022.
Putin is at it again.
And honestly, if you really want to understand
the mind of Vladimir Putin and his whole view on this,
you have to read this.
"On the History of Unity of Russians and Ukrainians,"
by Vladimir Putin.
A blog post that kind of sounds
like a ninth grade history essay.
In this essay, Vladimir Putin argues
that Russia and Ukraine are one people.
He calls them essentially the same historical
and spiritual space.
Kind of beautiful writing, honestly.
Anyway, he argues that the division
between the two countries is due to quote,
"a deliberate effort by those forces
that have always sought to undermine our unity."
And that the formula they use, these outside forces,
is a classic one: divide and rule.
And then he launches into this super indepth,
like 10page argument, as to every single historical beat
of Ukraine and Russia's history
to make this argument that like,
this is one people and the division is totally because
of outside powers, i.e. the West.
Okay, but listen, there's this moment
at the end of the post,
that actually kind of hit me in a big way.
He says this, "Just have a look at Austria and Germany,
or the U.S. and Canada, how they live next to each other.
Close in ethnic composition, culture,
and in fact, sharing one language,
they remain sovereign states with their own interests,
with their own foreign policy.
But this does not prevent them
from the closest integration or allied relations.
They have very conditional, transparent borders.
And when crossing them citizens feel at home.
They create families, study, work, do business.
Incidentally, so do millions of those born in Ukraine
who now live in Russia.
We see them as our own close people."
I mean, listen, like,
I'm not in support of what Putin is doing,
but like that, it's like a pretty solid like analogy.
If China suddenly showed up and started like
coaxing Canada into being a part of its alliance,
I would be a little bit like, "What's going on here?"
That's what Putin feels.
And so I kind of get what he means there.
There's a deep heritage and connection between these people.
And he's seen that falter and dissolve
and he doesn't like it.
He clearly genuinely feels a brotherhood
and this deep heritage connection
with the people of Ukraine.
Okay, okay, okay, okay. Putin, I get it.
Your essay is compelling there at the end.
You're clearly very smart and wellread.
But this does not justify what you've been up to. Okay?
It doesn't justify sending 100,000 troops to the border
or sending cyber soldiers to sabotage
the Ukrainian government, or annexing territory,
fueling a conflict that has killed
tens of thousands of people in Eastern Ukraine.
No. Okay.
No matter how much affection you feel for Ukrainian heritage
and its connection to Russia, this is not okay.
Again, it's like the boyfriend
who genuinely loves his girlfriend.
They had a great relationship,
but they broke up and she's free to see whomever she wants.
But Putin is not ready to let go.
[Man In Blue Shirt] What the hell's wrong with you?
I love you, Jessica.
What the hell is wrong with you?
Dude, don't fucking touch me.
I love you. Worldstar!
What is wrong with you? Just stop!
Putin has constructed his own reality here.
One in which Ukraine is actually being controlled
by shadowy Western forces
who are holding the people of Ukraine hostage.
And if that he invades, it will be a swift victory
because Ukrainians will accept him with open arms.
The great liberator.
(triumphant music)
Like, this guy's a total romantic.
He's a history buff and a romantic.
And he has a hill to die on here.
And it is liberating the people
who have been taken from the Russian motherland.
Kind of like the abusive boyfriend, who's like,
"She actually really loves me,
but it's her annoying friends
who were planting all these ideas in her head.
That's why she broke up with me."
And it's like, "No, dude, she's over you."
[Man In Blue Shirt] What the hell is wrong with you?
I love you, Jessica.
I mean, maybe this video should be called
Putin is just like your abusive exboyfriend.
[Man In Blue Shirt] What the hell is wrong with you?
I love you, Jessica!
Worldstar! What's wrong with you?
Okay. So where does this leave us?
It's 2022, Putin is showing up to these meetings in Europe
to tell them where he stands.
He says, "NATO, you cannot expand anymore. No new members.
And you need to withdraw all your troops
from Eastern Europe, my neighborhood."
He knows these demands will never be accepted
because they're ludicrous.
But what he's doing is showing a false effort to say,
"Well, we tried to negotiate with the West,
but they didn't want to."
Hence giving a little bit more justification
to a Russian invasion.
So will Russia invade? Is there war coming?
Maybe; it's impossible to know
because it's all inside of the head of this guy.
But, if I were to make the best argument
that war is not coming tomorrow,
I would look at a few things.
Number one, war in Ukraine would be incredibly costly
for Vladimir Putin.
Russia has a far superior army to Ukraine's,
but still, Ukraine has a very good army
that is supported by the West
and would give Putin a pretty bad bloody nose
in any invasion.
Controlling territory in Ukraine would be very hard.
Ukraine is a giant country.
They would fight back and it would be very hard
to actually conquer and take over territory.
Another major point here is that if Russia invades Ukraine,
this gives NATO new purpose.
If you remember, NATO was created because of the Cold War,
because the Soviet Union was big and nuclear powered.
Once the Soviet Union fell,
NATO sort of has been looking for a new purpose
over the past couple of decades.
If Russia invades Ukraine,
NATO suddenly has a brand new purpose to unite
and to invest in becoming more powerful than ever.
Putin knows that.
And it would be very bad news for him if that happened.
But most importantly, perhaps the easiest clue
for me to believe that war isn't coming tomorrow
is the Russian propaganda machine
is not preparing the Russian people for an invasion.
In 2014, when Russia was about to invade
and take over Crimea, this part of Ukraine,
there was a barrage of state propaganda
that prepared the Russian people
that this was a justified attack.
So when it happened, it wasn't a surprise
and it felt very normal.
That isn't happening right now in Russia.
At least for now. It may start happening tomorrow.
But for now, I think Putin is showing up to the border,
flexing his muscles and showing the West that he is earnest.
I'm not sure that he's going to invade tomorrow,
but he very well could.
I mean, read the guy's blog post
and you'll realize that he is a romantic about this.
He is incredibly idealistic about the glory days
of the Slavic empires, and he wants to get it back.
So there is dangerous momentum towards war.
And the way war works is even a small little, like, fight,
can turn into the other guy
doing something bigger and crazier.
And then the other person has to respond
with something a little bit bigger.
That's called escalation.
And there's not really a ceiling
to how much that momentum can spin out of control.
That is why it's so scary when two nuclear countries
go to war with each other,
because there's kind of no ceiling.
So yeah, it's dangerous. This is scary.
I'm not sure what happens next here,
but the best we can do is keep an eye on this.
At least for now, we better understand
what Putin really wants out of all of this.
Thanks for watching.

Farhad Malik
3 years ago
How This Python Script Makes Me Money Every Day
Starting a passive income stream with data science and programming
My website is fresh. But how do I monetize it?
Creating a passive-income website is difficult. Advertise first. But what useful are ads without traffic?
Let’s Generate Traffic And Put Our Programming Skills To Use
SEO boosts traffic (Search Engine Optimisation). Traffic generation is complex. Keywords matter more than text, URL, photos, etc.
My Python skills helped here. I wanted to find relevant, Google-trending keywords (tags) for my topic.
First The Code
I wrote the script below here.
import re
from string import punctuation
import nltk
from nltk import TreebankWordTokenizer, sent_tokenize
from nltk.corpus import stopwords
class KeywordsGenerator:
def __init__(self, pytrends):
self._pytrends = pytrends
def generate_tags(self, file_path, top_words=30):
file_text = self._get_file_contents(file_path)
clean_text = self._remove_noise(file_text)
top_words = self._get_top_words(clean_text, top_words)
suggestions = []
for top_word in top_words:
suggestions.extend(self.get_suggestions(top_word))
suggestions.extend(top_words)
tags = self._clean_tokens(suggestions)
return ",".join(list(set(tags)))
def _remove_noise(self, text):
#1. Convert Text To Lowercase and remove numbers
lower_case_text = str.lower(text)
just_text = re.sub(r'\d+', '', lower_case_text)
#2. Tokenise Paragraphs To words
list = sent_tokenize(just_text)
tokenizer = TreebankWordTokenizer()
tokens = tokenizer.tokenize(just_text)
#3. Clean text
clean = self._clean_tokens(tokens)
return clean
def _clean_tokens(self, tokens):
clean_words = [w for w in tokens if w not in punctuation]
stopwords_to_remove = stopwords.words('english')
clean = [w for w in clean_words if w not in stopwords_to_remove and not w.isnumeric()]
return clean
def get_suggestions(self, keyword):
print(f'Searching pytrends for {keyword}')
result = []
self._pytrends.build_payload([keyword], cat=0, timeframe='today 12-m')
data = self._pytrends.related_queries()[keyword]['top']
if data is None or data.values is None:
return result
result.extend([x[0] for x in data.values.tolist()][:2])
return result
def _get_file_contents(self, file_path):
return open(file_path, "r", encoding='utf-8',errors='ignore').read()
def _get_top_words(self, words, top):
counts = dict()
for word in words:
if word in counts:
counts[word] += 1
else:
counts[word] = 1
return list({k: v for k, v in sorted(counts.items(), key=lambda item: item[1])}.keys())[:top]
if __name__ == "1__main__":
from pytrends.request import TrendReq
nltk.download('punkt')
nltk.download('stopwords')
pytrends = TrendReq(hl='en-GB', tz=360)
tags = KeywordsGenerator(pytrends)\
.generate_tags('text_file.txt')
print(tags)Then The Dependencies
This script requires:
nltk==3.7
pytrends==4.8.0Analysis of the Script
I copy and paste my article into text file.txt, and the code returns the keywords as a comma-separated string.
To achieve this:
A class I made is called KeywordsGenerator.
This class has a function:
generate_tagsThe function
generate_tagsperforms the following tasks:
retrieves text file contents
uses NLP to clean the text by tokenizing sentences into words, removing punctuation, and other elements.
identifies the most frequent words that are relevant.
The
pytrendsAPI is then used to retrieve related phrases that are trending for each word from Google.finally adds a comma to the end of the word list.
4. I then use the keywords and paste them into the SEO area of my website.
These terms are trending on Google and relevant to my topic. My site's rankings and traffic have improved since I added new keywords. This little script puts our knowledge to work. I shared the script in case anyone faces similar issues.
I hope it helps readers sell their work.