The oddities of the bigram "ed"
#22
(16-02-2026, 03:55 AM)Dunsel wrote: You are not allowed to view links. Register or Login to view.I typically strip all punctuation, lower case and then split the text into 100 word groups, something close to herbal page sizes.

A digram will stand out in your plots only if it occurs many times on a large fraction of the pages and zero times on another large fraction of the pages. Then the number of pages with the bigram will be anomalously low and it will stand out in the plot   

For example, suppose the bigram occurs 2000 times, and you have 100 pages, you would expect it to occur on almost all of those 100 pages.  But if instead there are 50 pages with four occurrences each, and 50 with no occurrences, the digram will stand out just like your ed

But if your "pages" are too small, even in the places where the digram is concentrated, almost all pages will have zero or one occurrences. Then the number of pages with the bigram will seem to be normal. 

Take that same text of the example above, but divide the text into 8000 pages instead of 100 pages.  Then those 50 pages that had all the 2000 occurrences will be split into 4000 pages, and thus those occurrences will be about one per page, and you will have ~2000 pages with occurrences.  Which is the expected number for 2000 evenly distributed occurrences.  Then the digram would seem to be normal in the plot.

Thus if a digram occurs N times overall, you should divide the text into, say, N/2 pages.  Then, if the digram is evenly distributed, one expects that it will occur in (1-1/e^2) = ~86% of the pages.   But if it is concentrated in some sections, the percentage of pages with the bigram will be much lower than that.

All the best, --stolfi


All the best, --stolfi
[+] 1 user says Thank You to Jorge_Stolfi for this post
Reply


Messages In This Thread
The oddities of the bigram "ed" - by Dunsel - 15-02-2026, 03:04 AM
RE: The oddities of the bigram "ed" - by ReneZ - 15-02-2026, 04:09 AM
RE: The oddities of the bigram "ed" - by Dunsel - 16-02-2026, 12:01 AM
RE: The oddities of the bigram "ed" - by eggyk - 15-02-2026, 11:02 AM
RE: The oddities of the bigram "ed" - by Dunsel - 16-02-2026, 12:29 AM
RE: The oddities of the bigram "ed" - by oshfdk - 16-02-2026, 01:11 AM
RE: The oddities of the bigram "ed" - by Dunsel - 16-02-2026, 01:15 AM
RE: The oddities of the bigram "ed" - by Dunsel - 16-02-2026, 03:55 AM
RE: The oddities of the bigram "ed" - by Jorge_Stolfi - 16-02-2026, 07:51 AM
RE: The oddities of the bigram "ed" - by Dunsel - 16-02-2026, 11:27 PM
RE: The oddities of the bigram "ed" - by Dunsel - 18-02-2026, 12:46 AM
RE: The oddities of the bigram "ed" - by Dunsel - 16-02-2026, 05:27 AM
RE: The oddities of the bigram "ed" - by ReneZ - 15-02-2026, 09:52 AM
RE: The oddities of the bigram "ed" - by Dunsel - 16-02-2026, 12:10 AM
RE: The oddities of the bigram "ed" - by oshfdk - 16-02-2026, 12:37 AM
RE: The oddities of the bigram "ed" - by Dunsel - 16-02-2026, 01:02 AM
RE: The oddities of the bigram "ed" - by oshfdk - 16-02-2026, 01:07 AM
RE: The oddities of the bigram "ed" - by Dunsel - 16-02-2026, 01:27 AM
RE: The oddities of the bigram "ed" - by Rafal - 16-02-2026, 12:46 AM
RE: The oddities of the bigram "ed" - by nablator - 17-02-2026, 10:37 AM
RE: The oddities of the bigram "ed" - by oshfdk - 16-02-2026, 02:16 AM
RE: The oddities of the bigram "ed" - by Dunsel - 16-02-2026, 05:40 AM
RE: The oddities of the bigram "ed" - by davidma - 16-02-2026, 11:39 AM
RE: The oddities of the bigram "ed" - by Skoove - 16-02-2026, 11:48 AM
RE: The oddities of the bigram "ed" - by ReneZ - 16-02-2026, 12:46 PM
RE: The oddities of the bigram "ed" - by Dunsel - 16-02-2026, 11:41 PM
RE: The oddities of the bigram "ed" - by Dunsel - 17-02-2026, 02:10 AM
RE: The oddities of the bigram "ed" - by Koen G - 17-02-2026, 12:39 AM
RE: The oddities of the bigram "ed" - by Dunsel - 17-02-2026, 01:50 AM
RE: The oddities of the bigram "ed" - by ReneZ - 17-02-2026, 07:32 AM
RE: The oddities of the bigram "ed" - by Dunsel - 18-02-2026, 12:41 AM
RE: The oddities of the bigram "ed" - by ReneZ - 17-02-2026, 12:16 PM
RE: The oddities of the bigram "ed" - by Dunsel - 18-02-2026, 12:51 AM
RE: The oddities of the bigram "ed" - by nablator - 17-02-2026, 09:00 PM
RE: The oddities of the bigram "ed" - by ReneZ - 18-02-2026, 12:54 AM
RE: The oddities of the bigram "ed" - by Dunsel - 18-02-2026, 02:20 AM
RE: The oddities of the bigram "ed" - by Dunsel - 19-02-2026, 01:16 AM
RE: The oddities of the bigram "ed" - by Dunsel - 17-03-2026, 05:54 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  The oddities of the bigram "ed" pt. 4 : The Chunking of Scribes Dunsel 13 3,398 29-05-2026, 06:27 PM
Last Post: Dunsel
  The oddities of the bigram "ed" pt. 3 : It's not just "ed" Dunsel 18 5,737 20-02-2026, 08:43 PM
Last Post: Jorge_Stolfi
  The oddities of the bigram "ed" pt. 2: Same as it ever was. Dunsel 16 5,705 18-02-2026, 06:45 PM
Last Post: Jorge_Stolfi

Forum Jump:


Users browsing this thread: 1 Guest(s)