Skip to content

Commit c0cb2bf

Browse files
committed
Separate some more nonrandom tests from the random.
1 parent 7be52df commit c0cb2bf

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

text.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -423,27 +423,28 @@ def goal_test(self, state):
423423
424424
>>> P3.samples(20)
425425
'flatland by edwin a abbott 1884 to the wake of a certificate from nature herself proving the equal sided triangle'
426+
""")
427+
__doc__ += """
426428
427429
## Probabilities of some common n-grams
428-
>>> P1['the']
429-
0.061139348356200607
430+
>>> P1['the'] #doctest:+ELLIPSIS
431+
0.0611...
430432
431-
>>> P2[('of', 'the')]
432-
0.010812081325655188
433+
>>> P2[('of', 'the')] #doctest:+ELLIPSIS
434+
0.0108...
433435
434436
>>> P3[('', '', 'but')]
435437
0.0
436438
437-
>>> P3[('so', 'as', 'to')]
438-
0.00032318721353860618
439+
>>> P3[('so', 'as', 'to')] #doctest:+ELLIPSIS
440+
0.000323...
439441
440442
## Distributions given the previous n-1 words
441443
>>> P2.cond_prob['went',].dictionary
444+
{}
442445
>>> P3.cond_prob['in', 'order'].dictionary
443446
{'to': 6}
444-
""")
445447
446-
__doc__ += """
447448
448449
## Build and test an IR System
449450
>>> uc = UnixConsultant()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy