programlibs/Embed/demos/pets.xtl

Embed on a corpus small enough to read: twelve sentences about pets and food. Run with "just demo-lib Embed pets".

source · imports em: libs/Embed/src/Embed.xtl

ids : Int

value · line 10

Words: 1 the, 2 cat, 3 dog, 4 eats, 5 fish, 6 meat, 7 sleeps, 8 runs. Each pet with each food and each action, so the two keep the same company. Sentences as word numbers, each ended by 0.

ids ← 1 2 4 5 0 1 2 4 6 0 1 3 4 5 0 1 3 4 6 0 1 2 7 0 1 2 8 0 1 3 7 0 1 3 8 0 2 4 5 0 3 4 6 0 2 8 0 3 7 0
Used in: C

C : Int

value · line 11
C ← (8, 2) ᵉᵐc̲ooccur ids

P : Float

value · line 14
P ← ᵉᵐp̲pmi C