Topic: Is there a way to look up tag statistics?

Posted under General

Was having a chat with friends recently about which pokemon are the most popular to create explicit art of, and I was wondering if there's some way to pull up statistics on that sort of thing. Something like pulling up the most popular species tags that include the pokemon series tag, and then filtering out the safe results. I think it would also be fun to do this with other tag statistics.

Huh, that topic matches up pretty close to the unsourced data one of friends pulled up. I wonder if it was drawing from that. Thank you for the info!

Donovan DMC

Former Staff

The most important part about a csv parser is for it to be spec compliant, then you probably also want it to stream rather than load everything at once

I used https://npm.im/csv-parse and it's worked wonderfully, it's spec compliant and streams

donovan_dmc said:
The most important part about a csv parser is for it to be spec compliant, then you probably also want it to stream rather than load everything at once

I used https://npm.im/csv-parse and it's worked wonderfully, it's spec compliant and streams

kora_viridian said:
If you do decide to write software, please use the CSV-parsing library that is available in whatever language you are using. Don't try to DIY the parsing by splitting on the commas; the posts file, in particular, has embedded commas and newlines in some of the fields, which will always break simple-minded code. I can say that Perl's Text::CSV_XS module seems to do the right thing. wat8548 rolled their own parser in Python, complete with its own state machine to handle all the strange cases. I think Donovan_DMC used an existing library in Node.js.

I've been using Quicksilver (QSV) which seems pretty fast with those 4GB CSV files and runs natively on multiple platforms. CSV-Parse is JS-based so if you're wanting to do it from a browser, that makes sense as well. QSV will stream to the console or a file.

Yeah, the Python library is a great option in addition to JS and compiled code. Most any OS supports it. I think there's even Android interpreters.

Be aware that if you try to import part of the posts database dump into something like Calc or Excel, you'll want to not select the descriptions as they can be many KBs each. In fact, next to the tags list, this is one of the biggest impacts on the size of the posts-* DB exports.

kora_viridian said:
Downloading the implications database (tag_implications-2024-08-xx.csv.gz) may help you find all the names to look for; on e621, the tag for every Pokemon name is supposed to imply a tag like generation_3_pokemon or similar.

Ah, I just used the Wiki and a link snarfer, then search and replace all but the end of the URL to leave just the tags. I then added 'tag' to first line as a header.

You can create this file (extracted from the Wiki entry for Pokemon_(species) that contains the sorted list of species tags:

pkmnspeciestags-2024-08-12.csv

tag
abomasnow
abra
absol
accelgor
aegislash
aerodactyl
aggron
aipom
alakazam
alcremie
alolan_diglett
alolan_dugtrio
alolan_exeggutor
alolan_form
alolan_geodude
alolan_golem
alolan_graveler
alolan_grimer
alolan_marowak
alolan_meowth
alolan_muk
alolan_ninetales
alolan_persian
alolan_raichu
alolan_raticate
alolan_rattata
alolan_sandshrew
alolan_sandslash
alolan_vulpix
alomomola
altaria
altered_forme_giratina
amaura
ambipom
amoonguss
amped_toxtricity
ampharos
annihilape
anorith
apex_build_koraidon
appletun
applin
aquatic_mode_miraidon
araquanid
arbok
arboliva
arcanine
arceus
archaludon
archen
archeops
archipelago_vivillon
arctibax
arctovish
arctozolt
ariados
armaldo
armarouge
aromatisse
aron
arrokuda
articuno
ash_greninja
attack_forme_deoxys
audino
aurorus
autumn_deerling
autumn_sawsbuck
avalugg
axew
azelf
azumarill
azurill
baby_kangaskhan
baby_pokemon
baby_pokémon
bagon
baile_oricorio
baltoy
banette
barbaracle
barboach
barraskewda
basculegion
basculin
bastiodon
baxcalibur
bayleef
beartic
beautifly
beedrill
beheeyem
beldum
bellibolt
bellossom
bellsprout
bergmite
bewear
bibarel
bidoof
binacle
bisharp
blacephalon
black_kyurem
blastoise
blaziken
blipbug
blissey
blitzle
blue-striped_basculin
blue_flower_flabebe
blue_flower_floette
blue_flower_florges
blue_plumage_squawkabilly
boldore
boltund
bombirdier
bonsly
bouffalant
bounsweet
braixen
brambleghast
bramblin
braviary
breloom
brionne
bronzong
bronzor
brute_bonnet
bruxish
budew
buizel
bulbasaur
buneary
bunnelby
burmy
butterfree
buzzwole
cacnea
cacturne
calyrex
camerupt
capsakid
carbink
carkol
carnivine
carracosta
carvanha
cascoon
castform
caterpie
celebi
celesteela
centiskorch
ceruledge
cetitan
cetoddle
chandelure
chansey
charcadet
charizard
charjabug
charmander
charmeleon
chatot
cherrim
cherubi
chesnaught
chespin
chewtle
chi-yu
chicken
chien-pao
chikorita
chimchar
chimecho
chinchou
chingling
cinccino
cinderace
clamperl
clauncher
clawitzer
claydol
clefable
clefairy
cleffa
clobbopus
clodsire
cloyster
coalossal
cobalion
cofagrigus
combee
combusken
comfey
conkeldurr
continental_vivillon
copperajah
cornerstone_mask_ogerpon
corphish
corsola
corviknight
corvisquire
cosmoem
cosmog
cosplay
cosplay_pikachu_(character)
cosplay_pikachu_(costume)
cottonee
crabominable
crabrawler
cradily
cramorant
cranidos
crawdaunt
cresselia
croagunk
crobat
crocalor
croconaw
crowned_shield_zamazenta
crowned_sword_zacian
crustle
cryogonal
cubchoo
cubone
cufant
cursola
cutiefly
cyclizar
cyndaquil
dachsbun
dandy_trim_furfrou
darkrai
darmanitan
dartrix
darumaka
dawn_wings_necrozma
debutante_trim_furfrou
decidueye
dedenne
deerling
defense_forme_deoxys
deino
delcatty
delibird
delphox
deoxys
dewgong
dewott
dewpider
dhelmise
dialga
diamond_trim_furfrou
diancie
diggersby
diglett
dipplin
ditto_(pokemon)
dodrio
doduo
dolliv
dondozo
donphan
dottler
doublade
dracovish
dracozolt
dragalge
dragapult
dragonair
dragonite
drakloak
drampa
drapion
dratini
drednaw
dreepy
drifblim
drifloon
drilbur
drive_mode_miraidon
drizzile
drowzee
druddigon
dubwool
ducklett
dudunsparce
dudunsparce_(three-segment_form)
dudunsparce_(two-segment_form)
dugtrio
dunsparce
duosion
duraludon
durant
dusclops
dusk_lycanroc
dusk_mane_necrozma
dusknoir
duskull
dustox
dwebble
dynamax_pokemon
east_sea_gastrodon
east_sea_shellos
eelektrik
eelektross
eevee
eeveelution
eiscue
ekans
eldegoss
electabuzz
electivire
electrike
electrode_(pokémon)
elegant_vivillon
elekid
elgyem
emboar
emolga
empoleon
enamorus
enamorus_(incarnate_form)
enamorus_(therian_form)
entei
escavalier
espathra
espeon
espurr
eternal_flower_floette
eternamax_eternatus
eternatus
excadrill
exeggcute
exeggutor
exploud
falinks
fan_character
fan_rotom
fancy_vivillon
farfetch'd
farigiraf
fearow
feebas
fennekin
feraligatr
ferroseed
ferrothorn
fezandipiti
fidough
finizen
finneon
flaaffy
flabebe
flamigo
flapple
flareon
fletchinder
fletchling
flittle
floatzel
floette
floragato
florges
flutter_mane
flygon
fomantis
foongus
forretress
fossil_pokemon
fraxure
frigibax
frillish
froakie
frogadier
froslass
frosmoth
frost_rotom
fuecoco
furfrou
furret
gabite
galarian_articuno
galarian_corsola
galarian_darmanitan
galarian_darumaka
galarian_farfetch'd
galarian_form
galarian_linoone
galarian_meowth
galarian_moltres
galarian_mr._mime
galarian_ponyta
galarian_rapidash
galarian_slowbro
galarian_slowking
galarian_slowpoke
galarian_stunfisk
galarian_weezing
galarian_yamask
galarian_zapdos
galarian_zigzagoon
gallade
galvantula
garbodor
garchomp
garden_vivillon
gardevoir
garganacl
gastly
gastrodon
generation_1_pokemon
generation_2_pokemon
generation_3_pokemon
generation_4_pokemon
generation_5_pokemon
generation_6_pokemon
generation_7_pokemon
generation_8_pokemon
generation_9_pokemon
genesect
gengar
geodude
gholdengo
gible
gigalith
gigantamax_alcremie
gigantamax_blastoise
gigantamax_butterfree
gigantamax_centiskorch
gigantamax_charizard
gigantamax_cinderace
gigantamax_coalossal
gigantamax_copperajah
gigantamax_corviknight
gigantamax_drednaw
gigantamax_duraludon
gigantamax_eevee
gigantamax_flapple
gigantamax_garbodor
gigantamax_gengar
gigantamax_grimmsnarl
gigantamax_hatterene
gigantamax_inteleon
gigantamax_kingler
gigantamax_lapras
gigantamax_machamp
gigantamax_melmetal
gigantamax_meowth
gigantamax_orbeetle
gigantamax_pikachu
gigantamax_pokemon
gigantamax_rillaboom
gigantamax_snorlax
gigantamax_toxtricity
gigantamax_urshifu
gigantamax_urshifu_(rapid_strike_style)
gigantamax_urshifu_(single_strike_style)
gigantamax_venusaur
gimmighoul
gimmighoul_(chest_form)
gimmighoul_(roaming_form)
girafarig
giratina
glaceon
glalie
glameow
glastrier
glide_mode_miraidon
gliding_build_koraidon
gligar
glimmet
glimmora
gliscor
glitch_pokemon
gloom_(pokemon)
gogoat
golbat
goldeen
golduck
golem_(pokémon)
golett
golisopod
golurk
goodra
goomy
gorebyss
gossifleur
gothita
gothitelle
gothorita
gouging_fire
gourgeist
grafaiai
granbull
grapploct
graveler
great_tusk
greavard
greedent
green_plumage_squawkabilly
greninja
grimer
grimmsnarl
grookey
grotle
groudon
grovyle
growlithe
grubbin
grumpig
gulpin
gumshoos
gurdurr
guzzlord
gyarados
hakamo-o
happiny
hariyama
hatenna
hatterene
hattrem
haunter
hawlucha
haxorus
heart_trim_furfrou
heartflame_mask_ogerpon
heat_rotom
heatmor
heatran
heliolisk
helioptile
heracross
herdier
hero_of_many_battles_zacian
hero_of_many_battles_zamazenta
high_plains_vivillon
hippopotas
hippowdon
hisuian_arcanine
hisuian_avalugg
hisuian_braviary
hisuian_decidueye
hisuian_electrode
hisuian_form
hisuian_goodra
hisuian_growlithe
hisuian_lilligant
hisuian_qwilfish
hisuian_samurott
hisuian_sliggoo
hisuian_sneasel
hisuian_typhlosion
hisuian_voltorb
hisuian_zoroark
hisuian_zorua
hitmonchan
hitmonlee
hitmontop
ho-oh
honchkrow
honedge
hoopa
hoopa_(confined)
hoopa_(unbound)
hoothoot
hoppip
horsea
houndoom
houndour
houndstone
huntail
hydrapple
hydreigon
hypno_(pokémon)
ice_face_eiscue
ice_rider_calyrex
icy_snow_vivillon
igglybuff
illumise
impidimp
incineroar
indeedee
infernape
inkay
inteleon
iron_boulder
iron_bundle
iron_crown
iron_hands
iron_jugulis
iron_leaves
iron_moth
iron_thorns
iron_treads
iron_valiant
ivysaur
jangmo-o
jellicent
jigglypuff
jirachi
jolteon
joltik
jumpluff
jungle_vivillon
jynx
kabuki_trim_furfrou
kabuto
kabutops
kadabra
kakuna
kangaskhan
karrablast
kartana
kecleon
keldeo
keldeo_(ordinary_form)
keldeo_(resolute_form)
kilowattrel
kingambit
kingdra
kingler
kirlia
klang
klawf
kleavor
klefki
klink
klinklang
koffing
komala
kommo-o
koraidon
krabby
kricketot
kricketune
krokorok
krookodile
kubfu
kyogre
kyurem
la_reine_trim_furfrou
lairon
lampent
land_forme_shaymin
landorus
landorus_(incarnate_form)
landorus_(therian_form)
lanturn
lapras
larvesta
larvitar
latias
latios
leafeon
leavanny
lechonk
ledian
ledyba
legendary_pokemon
lickilicky
lickitung
liepard
lileep
lilligant
lillipup
limited_build_koraidon
linoone
litleo
litten
litwick
lokix
lombre
lopunny
lotad
loudred
low-power_mode_miraidon
low_key_toxtricity
lucario
ludicolo
lugia
lumineon
lunala
lunatone
lurantis
luvdisc
luxio
luxray
lycanroc
mabosstiff
machamp
machoke
machop
magby
magcargo
magearna
magikarp
magmar
magmortar
magnemite
magneton
magnezone
makuhita
malamar
mamoswine
manaphy
mandibuzz
manectric
mankey
mantine
mantyke
maractus
mareanie
mareep
marill
marine_vivillon
marowak
marshadow
marshtomp
maschiff
masquerain
matron_trim_furfrou
maushold
maushold_(family_of_four)
maushold_(family_of_three)
mawile
meadow_vivillon
medicham
meditite
mega_abomasnow
mega_absol
mega_aerodactyl
mega_aggron
mega_alakazam
mega_altaria
mega_ampharos
mega_audino
mega_banette
mega_beedrill
mega_blastoise
mega_blaziken
mega_camerupt
mega_charizard_x
mega_charizard_y
mega_diancie
mega_evolution
mega_gallade
mega_garchomp
mega_gardevoir
mega_gengar
mega_glalie
mega_gyarados
mega_heracross
mega_houndoom
mega_kangaskhan
mega_latias
mega_latios
mega_lopunny
mega_lucario
mega_manectric
mega_mawile
mega_medicham
mega_metagross
mega_mewtwo_x
mega_mewtwo_y
mega_pidgeot
mega_pinsir
mega_rayquaza
mega_sableye
mega_salamence
mega_sceptile
mega_scizor
mega_sharpedo
mega_slowbro
mega_steelix
mega_swampert
mega_tyranitar
mega_venusaur
meganium
melmetal
meloetta
meloetta_(aria_form)
meloetta_(pirouette_form)
meltan
meowscarada
meowstic
meowth
mesprit
metagross
metang
metapod
mew_(pokemon)
mewtwo
midday_lycanroc
midnight_lycanroc
mienfoo
mienshao
mightyena
milcery
milotic
miltank
mime_jr.
mimikyu
minccino
minior
minior_(meteor_form)
minior_blue_core
minior_green_core
minior_indigo_core
minior_orange_core
minior_red_core
minior_violet_core
minior_yellow_core
minun
miraidon
misdreavus
mismagius
modern_vivillon
moltres
monferno
monsoon_vivillon
monster
morelull
morgrem
morpeko
morpeko_(full_belly_mode)
morpeko_(hangry_mode)
mothim
mow_rotom
mr._mime
mr._rime
mudbray
mudkip
mudsdale
muk
munchlax
munkidori
munna
murkrow
musharna
nacli
naclstack
naganadel
natu
natural_furfrou
necrozma
nickit
nidoking
nidoqueen
nidoran♀
nidoran♂
nidorina
nidorino
nihilego
nincada
ninetales
ninjask
noctowl
noibat
noice_face_eiscue
noivern
normal_castform
normal_forme_deoxys
normal_rotom
nosepass
numel
nuzleaf
nymble
obstagoon
ocean_vivillon
octillery
oddish
ogerpon
oinkologne
okidogi
omanyte
omastar
onix
orange_flower_flabebe
orange_flower_floette
orange_flower_florges
oranguru
orbeetle
oricorio
origin_forme_dialga
origin_forme_giratina
origin_forme_palkia
original_color_magearna
orthworm
oshawott
overcast_form_cherrim
overqwil
pa'u_oricorio
pachirisu
palafin
palafin_(hero_form)
palafin_(zero_form)
paldean_form
paldean_tauros
paldean_tauros_(aqua_breed)
paldean_tauros_(blaze_breed)
paldean_tauros_(combat_breed)
paldean_wooper
palkia
palossand
palpitoad
pancham
pangoro
panpour
pansage
pansear
paradox_pokemon
paras
parasect
passimian
patrat
pawmi
pawmo
pawmot
pawniard
pecharunt
pelipper
perrserker
persian_(pokemon)
petilil
phanpy
phantump
pharaoh_trim_furfrou
pheromosa
phione
pichu
pidgeot
pidgeotto
pidgey
pidove
pignite
pikachu
pikachu_belle
pikachu_libre
pikachu_ph._d
pikachu_pop_star
pikachu_rock_star
pikipek
piloswine
pincurchin
pineco
pinsir
piplup
plant_cloak_burmy
plant_cloak_wormadam
plusle
poipole
pokeball
pokefur
pokemon
pokemon(species)
pokemon_(creature)
pokemon_(creatures)
pokemon_baby
pokemon_costume
pokemon_creatures
pokemon_humanoid
pokemon_naga
pokemon_species
pokemon_taur
pokemorph
pokesex
pokken_tournament
poké_ball_vivillon
pokémon(species)
pokémon_(creature)
pokémon_(creatures)
pokémon_(species)
pokémon_baby
pokémon_creatures
pokémon_species
polar_vivillon
politoed
poliwag
poliwhirl
poliwrath
poltchageist
polteageist
pom-pom_oricorio
ponyta
poochyena
popplio
porygon
porygon-z
porygon2
primal_groudon
primal_kyogre
primarina
primeape
prinplup
probopass
psyduck
pumpkaboo
pupitar
purrloin
purugly
pyroar
pyukumuku
quagsire
quaquaval
quaxly
quaxwell
quilava
quilladin
qwilfish
raboot
rabsca
raging_bolt
raichu
raikou
rainy_castform
ralts
rampardos
rapid_strike_style_urshifu
rapidash
raticate
rattata
rayquaza
red-striped_basculin
red_flower_flabebe
red_flower_floette
red_flower_florges
regice
regidrago
regieleki
regigigas
regional_form_(pokemon)
regional_form_(pokémon)
regirock
registeel
relicanth
rellor
remoraid
reshiram
reuniclus
revavroom
rhydon
rhyhorn
rhyperior
ribombee
rillaboom
riolu
river_vivillon
roaring_moon
rockruff
roggenrola
rolycoly
rookidee
roselia
roserade
rotom
rotom_information
rotom_phone
rotom_pokédex
rowlet
rufflet
runerigus
sableye
salamence
salandit
salazzle
samurott
sandaconda
sandile
sandshrew
sandslash
sandstorm_vivillon
sandy_cloak_burmy
sandy_cloak_wormadam
sandy_shocks
sandygast
savanna_vivillon
sawk
sawsbuck
scatterbug
sceptile
scizor
scolipede
scorbunny
scovillain
scrafty
scraggy
scream_tail
scyther
seadra
seaking
sealeo
seedot
seel
seismitoad
sensu_oricorio
sentret
serperior
servine
seviper
sewaddle
shadow_lugia
shadow_mewtwo
shadow_pokemon
shadow_rider_calyrex
shaodw_pokemon
sharpedo
shaymin
shedinja
shelgon
shellder
shellos
shelmet
shieldon
shiftry
shiinotic
shinx
shiny_pokemon
shroodle
shroomish
shuckle
shuppet
sigilyph
silcoon
silicobra
silvally
simipour
simisage
simisear
single_strike_style_urshifu
sinistcha
sinistea
sirfetch'd
sizzlipede
skarmory
skeledirge
skiddo
skiploom
skitty
skorupi
skrelp
skuntank
skwovet
sky_forme_shaymin
slaking
slakoth
sliggoo
slither_wing
slowbro
slowking
slowpoke
slugma
slurpuff
smeargle
smoliv
smoochum
sneasel
sneasler
snivy
snom
snorlax
snorunt
snover
snowy_castform
snubbull
sobble
solgaleo
solosis
solrock
spearow
spectrier
speed_forme_deoxys
spewpa
spheal
spidops
spiky-eared_pichu
spinarak
spinda
spiritomb
spoink
sprigatito
spring_deerling
spring_sawsbuck
sprinting_build_koraidon
spritzee
squawkabilly
squirtle
stakataka
standard_mode_darmanitan
standard_mode_galarian_darmanitan
stantler
star_trim_furfrou
staraptor
staravia
starly
starmie
staryu
steelix
steenee
stonjourner
stoutland
strange_shiny_pokemon
stufful
stunfisk
stunky
substitute_doll
sudowoodo
suicune
summer_deerling
summer_sawsbuck
sun_vivillon
sunflora
sunkern
sunny_castform
sunshine_form_cherrim
surskit
swablu
swadloon
swalot
swampert
swanna
swellow
swimming_build_koraidon
swinub
swirlix
swoobat
sylveon
tadbulb
taillow
talonflame
tandemaus
tangela
tangrowth
tapu_bulu
tapu_fini
tapu_koko
tapu_lele
tarountula
tatsugiri
tatsugiri_(curly_form)
tatsugiri_(droopy_form)
tatsugiri_(stretchy_form)
tauros
teal_mask_ogerpon
teddiursa
tentacool
tentacruel
tepig
terapagos
terapagos_(normal_form)
terapagos_(stellar_form)
terapagos_(terastal_form)
terrakion
thievul
throh
thundurus
thundurus_(incarnate_form)
thundurus_(therian_form)
thwackey
timburr
ting-lu
tinkatink
tinkaton
tinkatuff
tirtouga
toedscool
toedscruel
togedemaru
togekiss
togepi
togetic
torchic
torkoal
tornadus
tornadus_(incarnate_form)
tornadus_(therian_form)
torracat
torterra
totodile
toucannon
toxapex
toxel
toxicroak
toxtricity
tranquill
trapinch
trash_cloak_burmy
trash_cloak_wormadam
treecko
trevenant
tropius
trubbish
trumbeak
tsareena
tundra_vivillon
turtonator
turtwig
tympole
tynamo
type_null
typhlosion
tyranitar
tyrantrum
tyrogue
tyrunt
ultimate_mode_miraidon
ultra_beast
ultra_necrozma
umbreon
unfezant
unown_!
unown_%3F
unown_(pokemon)
unown_a
unown_b
unown_c
unown_d
unown_e
unown_f
unown_g
unown_h
unown_i
unown_j
unown_k
unown_l
unown_m
unown_n
unown_o
unown_p
unown_q
unown_r
unown_s
unown_t
unown_u
unown_v
unown_w
unown_x
unown_y
unown_z
ursaluna
ursaluna_(bloodmoon_form)
ursaring
urshifu
uxie
vanillish
vanillite
vanilluxe
vaporeon
varoom
veluza
venipede
venomoth
venonat
venusaur
vespiquen
vibrava
victini
victreebel
vigoroth
vikavolt
vileplume
virizion
vivillon
volbeat
volcanion
volcarona
voltorb
vullaby
vulpix
wailmer
wailord
walking_wake
walrein
wartortle
wash_rotom
watchog
wattrel
weavile
weedle
weepinbell
weezing
wellspring_mask_ogerpon
werepokemon
west_sea_gastrodon
west_sea_shellos
whimsicott
whirlipede
whiscash
whismur
white-striped_basculin
white_flower_flabebe
white_flower_floette
white_flower_florges
white_kyurem
white_plumage_squawkabilly
wigglytuff
wiglett
wimpod
wingull
winter_deerling
winter_sawsbuck
wishiwashi
wishiwashi_(school_form)
wishiwashi_(solo_form)
wo-chien
wobbuffet
woobat
wooloo
wooper
wormadam
wugtrio
wurmple
wynaut
wyrdeer
xatu
xerneas
xerneas_(active_mode)
xerneas_(neutral_mode)
xurkitree
yamask
yamper
yanma
yanmega
yellow_flower_flabebe
yellow_flower_floette
yellow_flower_florges
yellow_plumage_squawkabilly
yungoos
yveltal
zacian
zamazenta
zangoose
zapdos
zarude
zebstrika
zekrom
zen_mode_darmanitan
zen_mode_galarian_darmanitan
zeraora
zigzagoon
zoroark
zorua
zubat
zweilous
zygarde
zygarde_10_forme
zygarde_50_forme
zygarde_cell
zygarde_complete_forme
zygarde_core

1st line: Only care about pokemon tags. Searches only through column 9 which is 'tag_string', for pokemon_(species).
2nd line: Outputs a plain text file that just has every instance of a tag and nothing else, not even headers.
3rd line: Changes spaces to newlines, then sorts the list of tags, then finds number of occurances of repeating lines. The sort step is sloooooow.
4th line: Appends a header to a new CSV file.
5th line: Convert the delimiter so this thing is using commas like a legit CSV file.
6th line: Only show results that are in the text file section above. The reVersed exclude (intersection) command filters out any tags not mentioned in pkmnspeciestags-2024-08-12.csv.

qsv search -s 9 pokemon_(species)* posts-2024-08-11.csv > postspokemonspecies-2024-08-11.csv
qsv select -n 9 postspokemonspecies-2024-08-11.csv | qsv behead > postspokemonspeciestags-2024-08-11.txt
tr '\040' '\n' < postspokemonspeciestags-2024-08-11.txt | sort | uniq -c | sort /R > 3
echo count tag > 2 | copy 2+3 1 /Y
qsv input --trim-fields --trim-headers 1 | tr '\040' ',' | tr -d '\042' | tr -d '\032' > pokemonspeciescountunfiltered-2024-08-11.csv
qsv exclude -v tag pokemonspeciescountunfiltered-2024-08-11.csv tag pkmnspeciestags-2024-08-12.csv > pokemonspeciescountfinished-2024-08-11.csv

After finishing all that, I realized that there is a searchset command that does most of it. Grr.

That ugly, barely-readable code above can be replaced with a few neat lines of Python or *insert most language names*, but it does work.

Updated

kora_viridian said:
I tried it my way, with the implications file, and came up with about 200 fewer entries than you did.

The implications file seems to be free of embedded commas, so that's not the problem.

$ # mine
$ grep 'generation_[0-9]*_pokemon' tag_implications-2024-08-12.csv  | grep ',active$' | awk -F, '{ print $2 }' >pokeymans.txt; wc -l pokeymans.txt
1211 pokeymans.txt

$ # yours
$ wc -l pkmnspeciestags-2024-08-12.csv
1452 pkmnspeciestags-2024-08-12.csv

$ # comma check on implications file
$ tr -d -c ',\n' <tag_implications-2024-08-12.csv  | sort | uniq -c | sort -n
55206 ,,,,

It's, uh... it seems to be, er... well... missing at least one.

It's marginally faster (at least on Linux and my SATA SSD) to write a temporary file and then have the sort read from that. I suspect the sort can memory-map the temporary file and read it faster than it can read the pipe. Also, I think when reading from the temporary file, sort can use both cores.

$ # pipe
$ time tr '\040' '\n' < postspokemonspeciestags-2024-01-04.txt | sort | uniq -c | sort -r > 3
real    0m49.768s
user    0m49.588s
sys     0m1.804s

$ # temp file
$ time tr '\040' '\n' < postspokemonspeciestags-2024-01-04.txt >temp.txt
real    0m0.745s
user    0m0.192s
sys     0m0.552s

$ time sort temp.txt | uniq -c | sort -r > 3
real    0m44.128s
user    1m16.656s
sys     0m1.902s

49.77 seconds vs. 44.87 sec... a touch under a 10% improvement.

TBF, this wasn't the most optimal setup. I figured that core utils and GNUWin32 had tools that were ported versions of Linux ones. The sort command in Windows is not exactly great at speed. 300MB should fit entirely in the system cache so it's obviously not being super efficient of an algorithm. If it had to seek the sectors, that would be hours not a minute? >:)

Optimized code should be able to do this many times faster.

As far as Missing No., I think it was because of some special character. I did notice a lot of Unicode stuff was still tagged, too.

Forgot to add the results.

Results:

count,tag
559827,pokemon
162997,generation_1_pokemon
117825,generation_4_pokemon
92640,generation_3_pokemon
81820,generation_2_pokemon
80199,generation_6_pokemon
77061,eeveelution
70083,pokemorph
69766,generation_5_pokemon
62766,legendary_pokemon
54501,generation_7_pokemon
38553,fan_character
36706,generation_8_pokemon
34062,lucario
23243,shiny_pokemon
21293,pikachu
20893,gardevoir
20078,umbreon
18670,eevee
16296,generation_9_pokemon
15784,sylveon
15233,lopunny
14893,vaporeon
14432,braixen
14056,regional_form_(pokemon)
13070,glaceon
12419,zoroark
12339,charizard
11284,mega_evolution
10856,pokeball
10316,arcanine
9568,lycanroc
9199,espeon
8997,blaziken
8495,cinderace
8338,lugia
7998,zangoose
7830,goodra
7775,jolteon
7762,leafeon
7538,flareon
7293,alolan_form
7067,raichu
6970,absol
6827,typhlosion
6524,midnight_lycanroc
6519,riolu
6269,delphox
6135,mewtwo
6056,incineroar
5246,meowscarada
5225,vulpix
5216,mew_(pokemon)
5025,salazzle
4854,hisuian_form
4735,luxray
4588,latias
4347,greninja
4192,zeraora
4143,quilava
4096,ninetales
4090,buizel
4025,zorua
4020,weavile
3983,snivy
3884,reshiram
3824,gengar
3813,serperior
3781,kirlia
3746,mienshao
3642,charmander
3568,shinx
3506,floatzel
3499,scorbunny
3443,charmeleon
3255,cosplay
3218,mightyena
3167,alolan_vulpix
3152,sprigatito
3152,fennekin
3145,garchomp
3125,dragonite
3040,ampharos
2981,primarina
2931,shaymin
2848,houndoom
2793,flygon
2738,pichu
2722,fossil_pokemon
2624,meowth
2571,scolipede
2552,meowstic
2542,nidoqueen
2522,ultra_beast
2506,feraligatr
2487,inteleon
2472,samurott
2442,mawile
2437,machoke
2402,latios
2384,audino
2332,furret
2287,sky_forme_shaymin
2278,paradox_pokemon
2276,dewott
2261,bulbasaur
2061,noivern
2046,dragonair
2018,mega_lopunny
2003,scrafty
1993,cosplay_pikachu_(costume)
1950,midday_lycanroc
1894,milotic
1838,totodile
1832,suicune
1806,nidoking
1792,jirachi
1789,grovyle
1779,galarian_form
1764,lapras
1756,pikachu_libre
1754,litten
1710,emolga
1693,growlithe
1685,ditto_(pokemon)
1680,poochyena
1671,zebstrika
1664,yveltal
1644,smeargle
1637,salandit
1631,sneasel
1603,arbok
1599,mudkip
1580,hisuian_typhlosion
1561,decidueye
1559,pheromosa
1502,nidorina
1494,hatterene
1488,rockruff
1483,raboot
1467,snorlax
1464,rattata
1459,miltank
1450,chespin
1433,giratina
1368,swampert
1368,meloetta
1367,mega_absol
1364,pachirisu
1364,gallade
1353,aggron
1351,squirtle
1339,oshawott
1326,mega_lucario
1311,obstagoon
1304,sandslash
1295,alolan_ninetales
1288,minun
1280,sceptile
1280,pokemon_humanoid
1266,luxio
1263,zekrom
1255,cosplay_pikachu_(character)
1252,hisuian_zoroark
1244,mismagius
1241,dusk_lycanroc
1217,plusle
1215,arceus
1197,bayleef
1176,haunter
1172,sableye
1170,seviper
1170,blastoise
1158,toxtricity
1132,rotom
1126,machamp
1124,minccino
1123,wooloo
1119,torracat
1117,tyranitar
1103,skitty
1094,mimikyu
1080,brionne
1079,infernape
1076,victini
1068,flaaffy
1065,banette
1062,shadow_pokemon
1042,ralts
1033,jigglypuff
1028,wartortle
1025,roserade
1021,pangoro
1009,nickit
1005,chikorita
1004,treecko
1004,mega_charizard_x
999,rapidash
996,whimsicott
986,ivysaur
973,celebi
967,cubone
956,furfrou
954,koraidon
939,meloetta_(aria_form)
939,alolan_raichu
936,floragato
929,maractus
927,mudsdale
921,buneary
917,popplio
911,alolan_meowth
906,rayquaza
897,tsareena
889,sobble
883,shadow_lugia
879,mega_gardevoir
879,chesnaught
866,hydreigon
855,kecleon
845,rillaboom
845,cyndaquil
825,monster
820,piplup
819,sneasler
805,liepard
799,ursaring
795,lurantis
783,venusaur
779,ho-oh
777,persian_(pokemon)
770,lilligant
764,froslass
763,spinda
761,darkrai
759,purrloin
757,zacian
751,linoone
746,tepig
744,muk
744,articuno
743,groudon
739,emboar
731,larvitar
730,hisuian_zorua
724,pidgeot
720,urshifu
714,amped_toxtricity
711,rhydon
704,mega_charizard_y
699,slowpoke
698,pancham
696,salamence
695,keldeo
693,solgaleo
674,leavanny
672,kangaskhan
670,apex_build_koraidon
664,deerling
663,meganium
660,houndour
656,silvally
654,gastly
647,palkia
646,dialga
641,gourgeist
640,torchic
638,sandshrew
638,delcatty
637,miraidon
637,girafarig
634,tinkaton
634,servine
633,pokemon_costume
627,zubat
627,land_forme_shaymin
626,espurr
621,mesprit
615,mienfoo
610,kyogre
606,galarian_ponyta
605,wigglytuff
604,quaquaval
603,gothitelle
601,joltik
592,altered_forme_giratina
588,purugly
588,breloom
585,rowlet
585,froakie
578,gigantamax_pokemon
577,alcremie
573,abra
571,croconaw
570,beedrill
565,grookey
564,zigzagoon
556,hoopa
554,magnemite
552,mega_banette
551,tyrantrum
543,togekiss
541,cinccino
534,magikarp
534,glameow
530,medicham
525,virizion
525,florges
523,manectric
522,xerneas
522,diglett
519,drowzee
517,low_key_toxtricity
514,haxorus
510,lunala
510,drizzile
510,butterfree
507,scyther
505,marshtomp
500,skuntank
489,ekans
479,ultimate_mode_miraidon
479,marowak
472,psyduck
470,indeedee
467,unown_(pokemon)
466,empoleon
455,uxie
454,mega_ampharos
450,tentacruel
450,sawsbuck
449,mega_mewtwo_y
447,heliolisk
446,roselia
446,misdreavus
445,scizor
445,murkrow
441,azumarill
426,krookodile
421,origin_forme_giratina
419,dratini
417,wooper
417,keldeo_(ordinary_form)
416,tauros
414,pignite
414,litwick
413,crowned_sword_zacian
412,gabite
411,manaphy
411,dusknoir
410,steenee
410,jynx
409,caterpie
407,mareep
402,krokorok
400,kommo-o
397,clefairy
396,zamazenta
396,hoopa_(confined)
390,pyroar
389,corviknight
387,teddiursa
386,azelf
382,aurorus
381,passimian
379,oddish
378,ponyta
378,hisuian_growlithe
378,altaria
377,moltres
377,goomy
376,mega_mawile
375,zygarde
374,galarian_rapidash
373,dedenne
373,alakazam
372,gyarados
372,fuecoco
370,slowbro
368,machop
368,entei
367,helioptile
366,nidoran♂
365,marshadow
362,quaxly
361,nidoran♀
360,clefable
355,cacturne
354,farigiraf
353,zapdos
352,gliscor
351,volcarona
348,yamper
348,nidorino
348,hisuian_samurott
346,raikou
346,mega_swampert
346,kadabra
341,pidgey
340,single_strike_style_urshifu
338,delibird
336,axew
335,kyurem
333,hawlucha
332,quagsire
332,diancie
331,lickitung
331,hitmonchan
329,bellossom
328,bidoof
327,cresselia
327,cofagrigus
326,pumpkaboo
324,dewgong
324,chatot
322,stunky
322,deoxys
317,hakamo-o
316,natural_furfrou
314,scraggy
314,golduck
311,chimchar
311,chicken
309,vespiquen
305,staraptor
305,combusken
304,weedle
304,deino
303,archeops
299,cherrim
298,excadrill
297,octillery
297,noibat
297,gogoat
297,electrike
296,wailord
296,shellder
296,electabuzz
295,mega_blaziken
295,galarian_zigzagoon
294,talonflame
291,chandelure
289,skarmory
288,simipour
286,swellow
285,ogerpon
284,dragapult
282,bisharp
282,appletun
280,heracross
280,fearow
279,marill
278,tangela
278,substitute_doll
273,bewear
273,bellsprout
271,cramorant
269,nuzleaf
268,sunshine_form_cherrim
267,wingull
267,spring_deerling
267,sharpedo
267,beartic
264,toxicroak
263,ribombee
259,politoed
258,xerneas_(active_mode)
258,pokken_tournament
257,grumpig
257,baby_kangaskhan
254,braviary
253,duskull
253,dunsparce
253,chansey
251,victreebel
250,thievul
250,honchkrow
250,croagunk
250,aerodactyl
249,monferno
249,celesteela
248,turtwig
247,crobat
246,tangrowth
245,tapu_lele
244,aipom
243,tropius
241,petilil
239,pidgeotto
239,dustox
239,blitzle
238,heat_rotom
237,torterra
237,slaking
236,alolan_sandslash
234,galvantula
233,mega_audino
233,luvdisc
233,eelektross
231,voltorb
231,lanturn
229,mareanie
229,cobalion
228,togetic
228,sliggoo
227,seismitoad
227,drifloon
226,vileplume
226,druddigon
225,reuniclus
225,metapod
225,golbat
224,porygon-z
224,archen
223,poliwrath
223,flabebe
222,swadloon
221,pawmot
221,onix
221,gothorita
221,ariados
220,staryu
218,koffing
217,boltund
216,winter_sawsbuck
214,keldeo_(resolute_form)
213,togepi
213,teal_mask_ogerpon
213,sunflora
213,buzzwole
211,phantump
211,nihilego
211,hero_of_many_battles_zacian
210,morpeko
209,xatu
209,wash_rotom
209,simisage
209,crowned_shield_zamazenta
206,raticate
206,dugtrio
206,diggersby
205,simisear
205,mr._mime
204,meloetta_(pirouette_form)
202,gastrodon
202,frogadier
201,walking_wake
201,hitmonlee
199,spearow
198,bunnelby
197,unown_e
197,pokemon_taur
197,mega_houndoom
197,hisuian_goodra
196,sentret
195,parasect
194,rapid_strike_style_urshifu
194,garbodor
193,poipole
192,normal_rotom
192,hitmontop
191,alolan_rattata
190,unown_a
190,rhyperior
190,noctowl
190,aegislash
188,tentacool
188,hisuian_sneasel
186,blue_flower_florges
185,swanna
184,wobbuffet
184,alolan_exeggutor
183,magearna
183,iron_valiant
181,porygon
181,drapion
179,sawk
179,goldeen
179,dracozolt
179,alolan_marowak
178,ledian
178,kakuna
178,blissey
178,bibarel
177,zygarde_10_forme
177,ursaluna
177,necrozma
177,grimer
177,gigantamax_cinderace
176,spectrier
176,skeledirge
176,shuppet
172,grimmsnarl
172,geodude
172,alolan_persian
171,shedinja
171,electivire
171,cosmog
169,swoobat
169,rotom_phone
169,graveler
168,mega_rayquaza
168,jumpluff
167,unown_o
167,spiky-eared_pichu
167,primeape
167,hoppip
167,gloom_(pokemon)
166,vivillon
165,regigigas
165,espathra
165,azurill
164,shuckle
163,pansage
163,corsola
162,poliwag
162,impidimp
162,hisuian_lilligant
161,krabby
161,dreepy
160,weepinbell
159,zweilous
159,slurpuff
159,okidogi
159,magmar
159,ceruledge
158,numel
158,greedent
158,golisopod
156,trevenant
155,terrakion
155,pawmi
154,stufful
154,mega_sceptile
154,magneton
154,granbull
153,wurmple
153,unown_t
153,slowking
152,illumise
151,pelipper
150,starmie
150,pyukumuku
150,doduo
149,white_kyurem
149,mega_gengar
149,galarian_meowth
149,ambipom
148,west_sea_gastrodon
148,steelix
147,cloyster
146,red_flower_florges
146,malamar
146,kabutops
146,chimecho
146,bouffalant
145,normal_forme_deoxys
145,limited_build_koraidon
145,castform
144,weezing
144,calyrex
143,phanpy
143,dodrio
143,abomasnow
142,unown_i
142,spiritomb
141,trubbish
141,quilladin
141,oricorio
141,horsea
140,spinarak
140,paras
140,ludicolo
140,dartrix
139,venomoth
139,unown_r
139,poliwhirl
139,gigantamax_charizard
138,unown_s
138,slugma
138,munchlax
138,hisuian_arcanine
137,rampardos
137,kingdra
135,paldean_form
135,mankey
135,hoothoot
135,fletchling
134,lombre
133,exeggutor
133,chinchou
132,spheal
131,rhyhorn
131,metagross
131,chien-pao
130,venonat
130,unown_c
130,torkoal
130,eldegoss
130,combee
129,honedge
129,grafaiai
128,unown_h
128,swablu
128,primal_groudon
128,mega_kangaskhan
128,lairon
128,igglybuff
128,galarian_linoone
128,cyclizar
127,trapinch
127,summer_deerling
127,oinkologne
127,gossifleur
127,cleffa
126,starly
126,porygon2
126,phione
126,floette
124,skiddo
124,pinsir
124,morpeko_(full_belly_mode)
124,gible
123,tyrogue
122,remoraid
122,golurk
122,gligar
121,mudbray
121,magnezone
121,litleo
120,unown_n
120,swirlix
120,smoochum
120,pikachu_pop_star
120,drifblim
120,bergmite
120,aromatisse
119,kabuto
119,gulpin
119,elekid
119,beheeyem
118,unown_m
118,sudowoodo
117,shadow_mewtwo
117,registeel
117,lotad
116,yungoos
116,watchog
116,spring_sawsbuck
116,natu
115,unown_d
115,lickilicky
114,venipede
114,togedemaru
114,omastar
114,hisuian_decidueye
114,dynamax_pokemon
113,unown_u
113,seel
113,cradily
112,skwovet
112,mega_garchomp
112,mantine
112,amaura
111,vanillite
111,unfezant
111,stantler
111,mandibuzz
110,wiglett
109,morgrem
109,gholdengo
109,armaldo
108,yamask
108,tatsugiri
108,primal_kyogre
108,patrat
108,cutiefly
107,vibrava
107,omanyte
107,frosmoth
106,scream_tail
106,feebas
106,bagon
105,unown_l
105,komala
105,kingler
105,fidough
105,dusclops
104,smoliv
104,armarouge
103,wynaut
103,tapu_fini
103,pidove
102,glitch_pokemon
102,camerupt
102,budew
101,drampa
101,cherubi
100,exeggcute
99,wailmer
99,thundurus
99,regice
99,herdier
99,drilbur
99,bruxish
98,walrein
98,snubbull
98,seaking
98,seadra
98,pawniard
98,hoopa_(unbound)
97,whiscash
97,ultra_necrozma
97,snorunt
97,lampent
97,beautifly
96,yanma
96,unown_g
96,shroomish
96,jangmo-o
96,frillish
96,cubchoo
96,carbink
95,winter_deerling
95,unown_y
95,slither_wing
94,swinub
94,sunkern
94,skiploom
94,pikipek
93,unown_k
93,unown_f
93,taillow
93,hero_of_many_battles_zamazenta
93,bounsweet
93,barboach
92,vigoroth
92,stoutland
91,zygarde_50_forme
91,flutter_mane
90,unown_p
90,stunfisk
90,paldean_wooper
90,fraxure
89,surskit
89,panpour
89,hariyama
89,dragalge
89,carracosta
88,wishiwashi
88,regirock
88,lechonk
88,happiny
88,donphan
88,attack_forme_deoxys
87,finneon
86,greavard
85,mega_mewtwo_x
85,glastrier
85,autumn_deerling
84,unown_w
84,swalot
84,pansear
84,aron
83,zygarde_core
83,xurkitree
83,thwackey
83,musharna
83,magcargo
83,galarian_zapdos
83,bronzong
82,tatsugiri_(curly_form)
82,sandile
82,normal_castform
82,blacephalon
81,tyrunt
81,spritzee
81,mamoswine
81,low-power_mode_miraidon
81,loudred
81,lillipup
81,gorebyss
81,genesect
80,snom
80,sandygast
80,makuhita
80,klefki
79,volbeat
79,ninjask
79,lunatone
78,masquerain
78,kubfu
78,gimmighoul
78,clodsire
77,slakoth
77,magby
77,conkeldurr
76,whismur
76,spoink
75,unown_b
75,qwilfish
75,hattrem
75,drednaw
74,yanmega
74,piloswine
74,nosepass
74,hatenna
74,ducklett
74,dracovish
73,timburr
73,glalie
73,fletchinder
73,cacnea
72,vanilluxe
72,toucannon
72,spewpa
72,solrock
72,mothim
71,lumineon
71,eternatus
71,chingling
70,shiinotic
70,sewaddle
70,mime_jr.
70,corphish
69,unown_x
69,throh
69,tandemaus
69,lileep
69,cottonee
69,alolan_muk
68,vanillish
68,prinplup
68,perrserker
68,beldum
67,wishiwashi_(solo_form)
67,tympole
67,relicanth
67,mega_latias
67,mega_blastoise
67,meditite
67,heatran
67,dubwool
67,cranidos
67,applin
65,toxel
65,snover
65,shiftry
65,mega_venusaur
65,larvesta
65,kabuki_trim_furfrou
65,foongus
65,debutante_trim_furfrou
65,crawdaunt
64,unown_v
64,tapu_koko
64,landorus
64,exploud
64,darmanitan
63,toxapex
63,seedot
63,palossand
63,naganadel
63,morelull
63,mega_gallade
63,ledyba
63,eiscue
63,doublade
63,basculegion
62,huntail
62,guzzlord
62,grotle
62,comfey
62,carvanha
61,zarude
61,tornadus
61,polteageist
61,kricketune
61,claydol
60,woobat
60,trumbeak
60,sigilyph
60,mantyke
60,jellicent
60,grapploct
60,east_sea_gastrodon
60,dolliv
59,morpeko_(hangry_mode)
59,meltan
59,mega_altaria
59,meadow_vivillon
59,heatmor
59,golett
59,baxcalibur
58,sealeo
58,magmortar
58,gimmighoul_(roaming_form)
58,autumn_sawsbuck
57,speed_forme_deoxys
57,pom-pom_oricorio
57,pecharunt
57,minior
57,baile_oricorio
56,pikachu_belle
56,pawmo
56,nincada
56,munna
56,mega_pidgeot
56,galarian_articuno
55,tranquill
55,solosis
55,roaring_moon
55,fezandipiti
55,carnivine
54,escavalier
53,raging_bolt
53,oranguru
53,galarian_moltres
53,forretress
53,clamperl
53,cascoon
53,bonsly
52,standard_mode_darmanitan
52,mega_diancie
52,falinks
52,amoonguss
51,tynamo
51,skorupi
51,scatterbug
51,maushold
51,kartana
51,gigantamax_eevee
51,gigalith
50,pupitar
50,gothita
50,elgyem
50,bastiodon
50,avalugg
50,alolan_sandshrew
49,kricketot
49,hisuian_braviary
49,eelektrik
48,thundurus_(incarnate_form)
48,silcoon
48,mega_sableye
48,duraludon
47,vikavolt
47,mega_manectric
47,ferrothorn
47,durant
46,staravia
46,shelgon
46,pineco
46,metang
46,drakloak
46,alolan_raticate
46,accelgor
45,wyrdeer
45,shellos
45,rufflet
45,hippowdon
45,heart_trim_furfrou
45,gumshoos
45,black_kyurem
45,anorith
45,alomomola
44,milcery
44,mega_medicham
44,hippopotas
44,crustle
44,bronzor
44,basculin
43,white_flower_florges
43,summer_sawsbuck
43,probopass
43,palpitoad
43,paldean_tauros
43,ice_face_eiscue
43,enamorus
43,dwebble
43,dhelmise
43,dachsbun
43,burmy
42,unown_!
42,type_null
42,pikachu_ph._d
42,inkay
42,frost_rotom
42,cryogonal
42,baltoy
41,werepokemon
41,tinkatuff
41,stakataka
41,defense_forme_deoxys
41,darumaka
40,gurdurr
40,arctozolt
39,shieldon
39,pikachu_rock_star
39,klink
39,karrablast
39,alolan_dugtrio
38,unown_z
38,star_trim_furfrou
38,mega_scizor
38,fomantis
37,wormadam
37,vullaby
37,iron_leaves
37,arboliva
36,zygarde_complete_forme
36,thundurus_(therian_form)
36,shelmet
36,sensu_oricorio
36,red_flower_flabebe
36,mega_latios
36,duosion
35,wimpod
35,unown_q
35,tornadus_(incarnate_form)
35,mow_rotom
35,kingambit
35,corvisquire
34,klinklang
34,fan_rotom
34,enamorus_(incarnate_form)
34,dawn_wings_necrozma
34,arrokuda
33,unown_j
33,cetitan
32,tirtouga
32,roggenrola
32,red_flower_floette
32,plant_cloak_burmy
32,munkidori
32,landorus_(incarnate_form)
31,xerneas_(neutral_mode)
31,volcanion
31,tapu_bulu
31,skrelp
31,runerigus
31,pincurchin
31,overcast_form_cherrim
31,mega_tyranitar
31,hydrapple
31,charjabug
31,bombirdier
30,wishiwashi_(school_form)
30,red-striped_basculin
30,copperajah
29,zygarde_cell
29,yellow_flower_florges
29,whirlipede
29,west_sea_shellos
29,plant_cloak_wormadam
29,mabosstiff
29,dusk_mane_necrozma
29,centiskorch
28,sandaconda
28,rookidee
28,crabrawler
28,clawitzer
28,arctovish
27,sinistea
27,quaxwell
27,palafin
27,flapple
27,boldore
26,mega_beedrill
26,maschiff
25,turtonator
25,tatsugiri_(stretchy_form)
25,noice_face_eiscue
25,melmetal
25,mega_aggron
25,maushold_(family_of_four)
25,gigantamax_machamp
25,east_sea_shellos
25,clauncher
25,alolan_grimer
24,tatsugiri_(droopy_form)
24,regieleki
24,minior_(meteor_form)
24,matron_trim_furfrou
24,galarian_corsola
24,ferroseed
24,crabominable
24,araquanid
23,terapagos
23,stonjourner
23,orange_flower_florges
23,mega_steelix
23,grubbin
23,gigantamax_pikachu
23,gigantamax_meowth
23,gigantamax_inteleon
22,galarian_weezing
22,galarian_slowbro
22,binacle
22,barbaracle
21,tinkatink
21,sunny_castform
21,regidrago
21,lokix
21,landorus_(therian_form)
21,blue-striped_basculin
21,bellibolt
21,alolan_diglett
20,orbeetle
20,kilowattrel
20,dondozo
20,dewpider
20,cursola
20,chi-yu
19,rainy_castform
19,gimmighoul_(chest_form)
19,galarian_slowpoke
19,galarian_slowking
19,charcadet
18,orthworm
18,mega_aerodactyl
18,klang
18,finizen
18,cufant
18,cosmoem
18,clobbopus
17,revavroom
17,palafin_(hero_form)
17,mega_salamence
17,great_tusk
17,dipplin
17,annihilape
16,zigzagoon
16,wugtrio
16,trash_cloak_burmy
16,sizzlipede
16,scovillain
16,mr._rime
16,mega_alakazam
16,iron_moth
16,hisuian_sliggoo
16,galarian_darmanitan
16,carkol
15,silicobra
15,minior_red_core
15,klawf
15,barraskewda
14,snowy_castform
14,origin_forme_palkia
14,mega_sharpedo
14,mega_heracross
14,mega_gyarados
14,crocalor
14,coalossal
13,tornadus_(therian_form)
13,toedscruel
13,terapagos_(terastal_form)
13,rolycoly
13,paldean_tauros_(blaze_breed)
13,origin_forme_dialga
13,kleavor
13,iron_bundle
13,hisuian_voltorb
13,glimmora
13,gigantamax_alcremie
13,garganacl
13,flamigo
13,dandy_trim_furfrou
13,chewtle
12,trash_cloak_wormadam
12,sandy_shocks
12,sandy_cloak_burmy
12,maushold_(family_of_three)
12,gigantamax_lapras
11,ocean_vivillon
11,minior_violet_core
11,mega_slowbro
11,mega_metagross
11,mega_glalie
11,iron_thorns
11,eternal_flower_floette
10,standard_mode_galarian_darmanitan
10,sandy_cloak_wormadam
10,rotom_information
10,paldean_tauros_(combat_breed)
10,palafin_(zero_form)
10,mega_pinsir
10,gigantamax_toxtricity
10,dudunsparce
10,dottler
10,blue_flower_floette
9,zen_mode_darmanitan
9,wo-chien
9,wellspring_mask_ogerpon
9,ting-lu
9,tarountula
9,squawkabilly
9,marine_vivillon
9,iron_hands
9,gigantamax_snorlax
9,blipbug
8,terapagos_(normal_form)
8,sinistcha
8,shroodle
8,savanna_vivillon
8,poltchageist
8,iron_crown
8,icy_snow_vivillon
8,gigantamax_venusaur
8,gigantamax_butterfree
8,galarian_yamask
8,galarian_mr._mime
8,galarian_darumaka
8,cetoddle
8,capsakid
8,alolan_golem
7,yellow_flower_flabebe
7,white_flower_floette
7,veluza
7,varoom
7,paldean_tauros_(aqua_breed)
7,original_color_magearna
7,minior_indigo_core
7,minior_blue_core
7,mega_camerupt
7,mega_abomasnow
7,gigantamax_hatterene
7,gigantamax_centiskorch
7,galarian_stunfisk
7,frigibax
7,flittle
7,elegant_vivillon
7,blue_flower_flabebe
7,arctibax
7,alolan_graveler
6,wattrel
6,tundra_vivillon
6,toedscool
6,spidops
6,overqwil
6,modern_vivillon
6,minior_yellow_core
6,minior_orange_core
6,minior_green_core
6,la_reine_trim_furfrou
6,houndstone
6,enamorus_(therian_form)
6,brute_bonnet
6,alolan_geodude
5,yellow_flower_floette
5,sun_vivillon
5,pharaoh_trim_furfrou
5,nacli
5,jungle_vivillon
5,iron_jugulis
5,hisuian_electrode
5,hisuian_avalugg
5,gigantamax_corviknight
5,garden_vivillon
5,diamond_trim_furfrou
5,continental_vivillon
5,bramblin
4,white_flower_flabebe
4,white-striped_basculin
4,shadow_rider_calyrex
4,sandstorm_vivillon
4,river_vivillon
4,rabsca
4,polar_vivillon
4,pokemon_naga
4,orange_flower_floette
4,high_plains_vivillon
4,glimmet
4,gigantamax_urshifu
4,gigantamax_grimmsnarl
4,gigantamax_duraludon
4,eternamax_eternatus
4,cornerstone_mask_ogerpon
4,brambleghast
4,archaludon
3,zen_mode_galarian_darmanitan
3,yellow_plumage_squawkabilly
3,tadbulb
3,orange_flower_flabebe
3,naclstack
3,monsoon_vivillon
3,iron_treads
3,ice_rider_calyrex
3,hisuian_qwilfish
3,green_plumage_squawkabilly
3,gouging_fire
3,gigantamax_drednaw
3,gigantamax_blastoise
3,fancy_vivillon
3,dudunsparce_(two-segment_form)
3,archipelago_vivillon
2,sylveon
2,nymble
2,iron_boulder
2,gigantamax_coalossal
1,zoroark
1,xatu
1,white_plumage_squawkabilly
1,terapagos_(stellar_form)
1,rellor
1,raichu
1,pokemorph
1,gigantamax_rillaboom
1,gigantamax_orbeetle
1,gigantamax_kingler
1,gigantamax_gengar
1,blue_plumage_squawkabilly
1,alolan_form

kora_viridian said:
I discovered that not all of the Pokemon imply a generation_[0-9]_pokemon tag. Good old missingno. and 'm_(ff) imply glitch_pokemon instead.

There are probably more exceptions that I haven't found yet. :D

Yeah, MLP and Pokemon in metasearch are a chore to walk the tree with. You basically have to follow the entire implication tree from the pokemon_(species) root to specific species at the end.

Rescue Rangers was on the other hand all in the first page and didn't need a huge amount of clicking.

kora_viridian said:
Another one for the list, the next time I run this program.

Fortunately beta_pokemon_(species) -pokemon_(species) is only ten posts, as of this writing, so it wouldn't have changed the above numbers much. (I'm guessing that uploaders or taggers are in the habit of manually applying both tags to the posts.)

I'm actually curious what makes your code take an hour. I wonder if maybe there's ways to optimize it, or if I just happened to luck upon an unconscious trick with the way I reduced all those file sizes at the first stage. It was out of habit, but I wonder how slow it would be if I directly did all this from just the unindexed, unsplit DB export source CSVs. A comparison/tabulation on roughly 550K tag lists seems to benefit greatly from a presort of some kind, also. I do notice that the sorting steps are FAR slower than the HDD copying. 4GB on this 1TB laptop drive is around 100MB/s for sequential access (no seeking)?

I should do something that recursively finds all the tags in an implication tree and outputs it to a list.

BTW: The way the indexing works, AFAIK, is to just tell roughly how long in bytes, groups of lines are, so that it doesn't have to seek all the previous lines to find an n'th line number in the file. So if you want the 10000th line, it directly jumps there instead of parsing all the new lines and quotes.

Laptop CPU is i7-640m (2.8GHz, dual-core, 4-threaded) with 16GB of RAM and Hitachi 1TB HDD. This is pretty old hardware, so it managing to go through the database as quick as it did was nice to see. I was worried that it would take way too long!

Updated

kora_viridian said:
Replying for notification: I would have got away with it, too, if it wasn't for those regular expressions! :D

An edit of my previous reply, to explain it, is expected shortly.

So these are comparable machines.
Cool that you figured it out!