Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

32
LINES

< > BotCompany Repo | #1031010 // "All parameters of a pattern are in the same class"

Document

High-level script:

  All parameters of a pattern are in the same class

So this time, the script is actually a statement/assumption.

Motivational example:

  Consider the phrase "milk, coffee and cigarettes"
  with pattern "*, * and *". There, all the parameters
  (milk, coffee, cigarettes) are in the class "things you can buy".

Intent: This script helps to parse better, and also can help us learn about things and their classes.

So how do we proceed?

First, a script rewrite - expand it into a scenario:

  There is a pattern
  There are parameters of the pattern
  There is a class
  Assumption: Each of the parameters is in the class

Now we can execute this in different ways. We can look for existing examples (matched patterns) and check if the assumption is true for them.

Or we can generate fresh assumptions and check them further.

Or we can prioritize (vote up) pattern matches where the assumption is true.

Also, we can find out for which pattern this typically holds and for which ones it doesn't.

Same with the parameters of a pattern - maybe only parameters in certain positions are in the same class.

download  show line numbers   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1031010
Snippet name: "All parameters of a pattern are in the same class"
Eternal ID of this version: #1031010/2
Text MD5: e6921b9d6ae4024e65f8384333bdc406
Author: stefan
Category: gazelle
Type: Document
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-04-20 16:38:44
Source code size: 1158 bytes / 32 lines
Pitched / IR pitched: No / No
Views / Downloads: 218 / 78
Version history: 1 change(s)
Referenced in: [show references]