Generating examples for use in Voice and other applications with Georg’s script

This is so true. :pray:

4 Likes

May i propose " one fine night" ?
It appears only in 4 consecutive suttas:
[(10, ‘mn134’), (7, ‘mn133’), (6, ‘mn132’), (5, ‘mn131’)]
A profound teaching on how to stay in the present moment in order to cultivate one’s meditation practice, and of course combined with the sense of urgency often conveyed by the Buddha. Who knows, the next deadly cow might come along faster than you think.

3 Likes

And then there were some weird ascetic practices like this:

“mn57:5.1”: "Take someone who develops the cow observance fully and uninterruptedly. They develop a cow’s ethics, a cow’s mentality, and a cow’s behavior fully and uninterruptedly. ",

“mn57:5.2”: "When their body breaks up, after death, they’re reborn in the company of cows. ",

3 Likes

Added. :white_check_mark:

This is the main Sutta that is caught by “like a cow”.

3 Likes

Hmm. perhaps “like a dog” also is a good example? There are those today who see the pampering dogs receive as pets and think “this dog has a good life”, wishing for a good life.

> [MN57:0.2](https://suttacentral.net/mn57/en/sujato#mn57:0.2): The Ascetic Who Behaved Like a Dog
> [MN57:2.1](https://suttacentral.net/mn57/en/sujato#mn57:2.1): Then Puṇṇa Koliyaputta, who had taken a vow to behave like a cow, and Seniya, a naked ascetic who had taken a vow to behave like a dog, went to see the Buddha. Puṇṇa bowed to the Buddha and sat down to one side, while Seniya exchanged greetings and polite conversation with him before sitting down to one side curled up like a dog.
> [MN57:2.4](https://suttacentral.net/mn57/en/sujato#mn57:2.4): For a long time he has undertaken that observance to behave like a dog.
> [MN57:2.10](https://suttacentral.net/mn57/en/sujato#mn57:2.10): For a long time he has undertaken that observance to behave like a dog.
> [MN57:4.6](https://suttacentral.net/mn57/en/sujato#mn57:4.6): But, sir, for a long time I have undertaken this observance to behave like a dog.
> [Thig16.1:62.2](https://suttacentral.net/thig16.1/en/sujato#thig16.1:62.2): You’re like a dog fixed to a chain:
> [DN24:1.7.3](https://suttacentral.net/dn24/en/sujato#dn24:1.7.3): Now at that time the naked ascetic Korakkhattiya had taken a vow to behave like a dog. When food is tossed on the ground, he gets down on all fours, eating and devouring it just with his mouth.
2 Likes

Added! :white_check_mark:

2 Likes

Thank you.

I was investigating also cats. We have befriended two cats. One cat thinks it’s a dog, so “like a dog” pertains. The other cat knows it’s a cat–she hunts. She hunts “like a cat”.

MN50:13.7: They’re just like a cat by an alley or a drain or a dustbin, which meditates and concentrates and contemplates and ruminates as it hunts a mouse.

So I think “meditates and concentrates” might be a good example. This singleton brings up a deep and powerful study of Mara, wrong immersion, Hell and Moggallāna.

I’ve added also:

  • like a cat
  • ruminates as it hunts
  • meditates and concentrates

The last two are MN50 singletons. I think they are important to add because we teach our children to have that single focus on task. We teach our children to hunt high grades. MN50 has a warning for us all. Hunting is an enemy of compassion.

2 Likes

Can we make it a bit more general? meditate.* and concentrate also returns AN 6.46, AN 11.9, and MN 108:

they meditate and concentrate and contemplate and ruminate

In German it would be meditier.* und konzentrier.

2 Likes

Great idea!

I changed it to “meditate and concentrate”. The .* is implied since scv-bilara automatically uses ordered keyword search if phrases don’t match exactly. That might work for German as well–just use a common prefix of each word. For Japanese I have no idea–it is ideographic. We’ll need to explore with Kaz as she gets deeper into translation and examples. :thinking:

2 Likes

That does not return “meditates and concentrates” as soon as there is any single case in the canon that has the exact match. Keyword search only works if phrase search isn’t successful. But fortunately, MN 50 also has “meditate and concentrate”, so it is found.

2 Likes

:open_mouth: Indeed you are right. :thinking:

Well then, how about “meditate concentrate”? The omission of “and” forces a keyword match and finds:

> [MN50:13.3](https://suttacentral.net/mn50/en/sujato#mn50:13.3): They’re just like an owl on a branch, which meditates and concentrates and contemplates and ruminates as it hunts a mouse.
> [MN50:13.5](https://suttacentral.net/mn50/en/sujato#mn50:13.5): They’re just like a jackal on a river-bank, which meditates and concentrates and contemplates and ruminates as it hunts a fish.
> [MN50:13.7](https://suttacentral.net/mn50/en/sujato#mn50:13.7): They’re just like a cat by an alley or a drain or a dustbin, which meditates and concentrates and contemplates and ruminates as it hunts a mouse.
> [MN50:13.9](https://suttacentral.net/mn50/en/sujato#mn50:13.9): They’re just like an unladen donkey by an alley or a drain or a dustbin, which meditates and concentrates and contemplates and ruminates.
> [MN50:13.10](https://suttacentral.net/mn50/en/sujato#mn50:13.10): In the same way, these shavelings, fake ascetics, riffraff, black spawn from the feet of our Kinsman, say, ‘We practice absorption meditation! We practice absorption meditation!’ Slouching, downcast, and dopey, they meditate and concentrate and contemplate and ruminate.’
> [AN11.9:2.10](https://suttacentral.net/an11.9/en/sujato#an11.9:2.10): Harboring sensual desire within they meditate and concentrate and contemplate and ruminate.
> [AN11.9:2.15](https://suttacentral.net/an11.9/en/sujato#an11.9:2.15): Harboring doubt within they meditate and concentrate and contemplate and ruminate.
> [MN108:26.4](https://suttacentral.net/mn108/en/sujato#mn108:26.4): Harboring sensual desire within they meditate and concentrate and contemplate and ruminate.
> [MN108:26.12](https://suttacentral.net/mn108/en/sujato#mn108:26.12): Harboring doubt within they meditate and concentrate and contemplate and ruminate.
> [AN6.46:2.2](https://suttacentral.net/an6.46/en/sujato#an6.46:2.2): ‘They say, ‘We practice absorption meditation! We practice absorption meditation!’ And they meditate and concentrate and contemplate and ruminate.
2 Likes

That finds the same results as “meditate and concentrate”, so any is good. :white_check_mark:

2 Likes

Very good. I’ve updated examples.

Example study is intricate. I’m glad we have many eyes looking! :eyes::eyes::eyes:

2 Likes

So I made the German “meditier konzentrier” now—that’s perhaps a bit less confusing as “meditier.* und konzentrier”. Although German people have to put up with quite a few .*s already.

2 Likes

I share your discomfort with regular expressions in examples. Yet I see no better way at present for the examples we have.

We might, in the future, wish to separate what the users see from the actual search phrase. For example, we might type something like this in the examples files:

meditates and concentrates: meditate.*and.*concentrate

That’s more work for us and it’s not clear if that work has corresponding value. One might even argue that using regular expressions has the side effect of teaching people regular expressions, which is tangential to the Dhamma. :laughing:

4 Likes

“tangled like string”
number of suttas: 3
[(2, ‘sn35.229’), (1, ‘sn12.60’), (1, ‘dn15’)]

“crossing”
number of suttas: 18
[(7, ‘an4.196’), (3, ‘mn22’), (2, ‘sn4.25’), (2, ‘mn38’), (1, ‘thag15.1’), (1, ‘sn55.38’), (1, ‘sn47.43’), (1, ‘sn47.18’), (1, ‘sn4.24’), (1, ‘sn35.238’), (1, ‘sn12.63’), (1, ‘sn1.1’), (1, ‘mn39’), (1, ‘mn35’), (1, ‘dn25’), (1, ‘dn2’), (1, ‘dn13’), (1, ‘dn10’)]

“cross the flood”
number of suttas: 7
[(2, ‘sn10.12’), (1, ‘ud7.3’), (1, ‘thig1.10’), (1, ‘thag21.1’), (1, ‘sn8.8’), (1, ‘sn1.1’), (1, ‘mn106’)]

“empty huts”
number of suttas: 20
[(3, ‘mn6’), (3, ‘an10.71’), (2, ‘sn43.12’), (2, ‘dn25’), (1, ‘sn47.10’), (1, ‘sn43.44’), (1, ‘sn43.11’), (1, ‘sn43.1’), (1, ‘sn35.146’), (1, ‘mn8’), (1, ‘mn32’), (1, ‘mn19’), (1, ‘mn152’), (1, ‘mn106’), (1, ‘iti45’), (1, ‘an9.19’), (1, ‘an7.74’), (1, ‘an5.74’), (1, ‘an5.73’), (1, ‘an10.48’)]

“roots of trees”
number of suttas: 15
[(3, ‘mn89’), (2, ‘sn43.12’), (1, ‘sn47.10’), (1, ‘sn43.44’), (1, ‘sn43.11’), (1, ‘sn43.1’), (1, ‘sn35.146’), (1, ‘mn8’), (1, ‘mn19’), (1, ‘mn152’), (1, ‘mn106’), (1, ‘an9.19’), (1, ‘an7.74’), (1, ‘an5.74’), (1, ‘an5.73’)]

often combined to:
“here are these roots of trees, and here are these empty huts…”
number of suttas: 13
[(2, ‘sn43.12’), (1, ‘sn47.10’), (1, ‘sn43.44’), (1, ‘sn43.11’), (1, ‘sn43.1’), (1, ‘sn35.146’), (1, ‘mn8’), (1, ‘mn19’), (1, ‘mn152’), (1, ‘mn106’), (1, ‘an7.74’), (1, ‘an5.74’), (1, ‘an5.73’)]

3 Likes

I like that one! … which is why we have already “like a ball of thread” which is part of that same phrase.

Making it “cross.* the flood” still includes “crossed”, “crosses”, and “crossing the flood” and returns 17 results.

In German this has to become simply “überquer”—which still includes a few rivers to be crossed, as well as old age and death, but anything with “Flut überquer” would exclude Thig 1.10

Upasamā, überquere die Flut
(Upasamā, cross the flood)

which would not be nice.

Adding “empty huts” | “leere.* Hütten”.

Probably that’s a bit redundant when we have “empty huts”. Except for one Sutta, the roots of trees are all included in the “empty huts” phrases.

This one Sutta is MN 89. It’s about King Pasenadi expressing his deep inspiration by the Buddha and his teaching. At the start he feels inspired by seeing “roots of trees”, but the summary of the discourse is expressed by the Buddha in the words “shrines to the teaching”. So I am adding “shrines”; it has 11 results of which MN 89 is the first one.

Thank you again, @georg, for your great suggestions!

3 Likes

I have come across ‘whirlpool’ as a powerful simile for the five kinds of sense stimulations.

Note the application of the term frequency (TF) in the tables below. It’s the number of matches divided by the sutta’s word count. The TF-IDF includes also a weighting applied to the TF. It depends on the frequency of the word across the entire corpus of suttas. The results are sorted from high to low TF-IDF.

Sutta: matches: TF: TF-IDF:
sn35.241 5 0.006097561 0.037139067
sn35.242 1 0.005 0.030454035
iti109 1 0.002777778 0.016918908

And as ‘whirlpools’:

Sutta: matches: TF: TF-IDF:
sn1.44 2 0.042553191 0.269877507
sn35.228 3 0.011627907 0.073745598
iti69 2 0.009049774 0.057394764
an4.122 6 0.006097561 0.038671472
iti109 1 0.002777778 0.017617004
mn67 5 0.002243158 0.014226383
4 Likes

Adding “whirlpool” | “Strudel”. :white_check_mark:

2 Likes

This is quite fascinating, especially with “whirlpools”. The Voice relevance score is matches+TF:

6.088   an4.122
5.039   mn67
3.12    sn35.228
2.286   sn1.44
2.074   iti69
1.033   iti109

SN1.44 is a bit perplexing in its terseness. In contrast, AN4.122 has a lower TF-IDF score, but is more useful in its explanation of whirlpools than SN1.44, which is useful as a mnemonic after deep study.

A high match count is strongly correlated with repetition associated with exposition. Exposition is quite important, so I think we need to incorporate matches into the formula. Indeed, it’s interesting that (matches + TF - IDF) would bubble AN4.122 to the top. Both formulas struggle a bit with SN1.44 vs. ITI69. Personally I would rate ITI69 more useful than SN1.44, but I have no idea how that might be formulated.

One would ordinarily expect TF to be sufficient on its own since TF does incorporate matches. However, the reason that TF doesn’t quite work with whirlpools is that the Buddha never gave an exposition on whirlpools alone. AN4.122 is the longest exposition on whirlpools, but whirlpools are merely 1/4 of AN4.122. Adding the matches addresses this case where exposition exists but not specific exposition.

Thank you, Anagarika. I shall never look at apple strudel again without seeing whirlpools.

4 Likes