Moe Chizari

Projects

The write-up

Interactive demo, added

HumanClassification (Part 3) – Parsing the page: try it.

Parse sample pages: structured data read first, then the title, heading and meta tags, with weighted keyword counts. Made-up pages.

Try it

Move the controls; the chart and the sentence under it update.

Approach 1: top words, weighted by tag0246backpackbackpack: weighted count 77trailtrail: weighted count 77exampleexample: weighted count 33outfittersoutfitters: weighted count 33newsletternewsletter: weighted count 22rainrain: weighted count 22
Approach 2: ld+json first, then H1, title and meta tags.
Essential data for an e-commerce page:

Title/H1 (from ld+json)
  Trail Backpack 40 L
Short description (from ld+json)
  A light 40 litre backpack for day hikes and weekend trips.
Brand (from ld+json)
  Sample Brand
Price (from ld+json)
  89.00 USD
Category (from ld+json)
  Outdoor > Backpacks

Approach 1's top words are "backpack", "trail", "example": a hint at the topic, but not the fields themselves. Approach 2 found 5 of 5 essential fields for an e-commerce page (5 from ld+json, 0 from H1, title or meta tags).

Made-up sample pages, parsed in your browser; nothing is fetched. Approach 1 counts words in title, H1 and paragraph tags, with title and H1 words counted several times, as the write-up's first attempt did. Approach 2 reads the page's ld+json block, then fills gaps from the H1, title and meta tags. A short stop-word list stands in for the nltk one.

Approach 1: top words, weighted by tag0246backpackbackpack: weighted count 77trailtrail: weighted count 77exampleexample: weighted count 33outfittersoutfitters: weighted count 33newsletternewsletter: weighted count 22rainrain: weighted count 22
Approach 2: ld+json first, then
H1, title and meta tags.
Essential data for an e-commerce
page:

Title/H1 (from ld+json)
  Trail Backpack 40 L
Short description (from ld+json)
  A light 40 litre backpack for
  day hikes and weekend trips.
Brand (from ld+json)
  Sample Brand
Price (from ld+json)
  89.00 USD
Category (from ld+json)
  Outdoor > Backpacks

Approach 1's top words are "backpack", "trail", "example": a hint at the topic, but not the fields themselves. Approach 2 found 5 of 5 essential fields for an e-commerce page (5 from ld+json, 0 from H1, title or meta tags).

Made-up sample pages, parsed in your browser; nothing is fetched. Approach 1 counts words in title, H1 and paragraph tags, with title and H1 words counted several times, as the write-up's first attempt did. Approach 2 reads the page's ld+json block, then fills gaps from the H1, title and meta tags. A short stop-word list stands in for the nltk one.

The write-up this goes with: HumanClassification (Part 3) – Parsing the page.

All demos