Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Help/markdown/New_in_Current_Version.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ The ANSI version shares the same source code with the Unicode version, but repli

## Miscellaneous

(4.1.2) **FIXED:** in an analyzer run by [callanalyzer](callanalyzer.md), a word that the calling analyzer's own dictionary already defined got none of the attributes in the called analyzer's lazily loaded `*full` dictionaries. For example, `hello` kept the caller's `greeting=1` but got no part of speech. The called analyzer's lazy files now add their attributes to such words too, looking each word up once. An analyzer's own lazy files still leave alone a word that its own dictionary defines.

(4.1.1) **FIXED:** in an analyzer run by [callanalyzer](callanalyzer.md), passes with `@NODES _ROOT` or `@PATH _ROOT` matched nothing, because the root they were given was the passed node under its own name. A called analyzer now gets a root of its own named `_ROOT`, holding the node's children, so it selects and traverses exactly as it does on a text of its own. **FIXED:** a word already in the knowledge base with no attributes of its own was never looked up in a lazily loaded `*full` dictionary, so it got no part of speech. Such bare words are common, because every attribute name is a dictionary word, and in a called analyzer the knowledge base is shared with the caller. They are now looked up once.

(4.1.0) **One analyzer can call another.** [callanalyzer](callanalyzer.md) runs another analyzer's passes on the subtree under a parse node, so one analyzer can be built from several separately written ones that all share a single parse tree and knowledge base. The called analyzer changes the caller's tree directly and puts its results under the concept it was given, which it gets with [callconcept](callconcept.md). It is loaded on the first call, together with its dictionaries and `.kbb` files, and stays in memory, so later calls pay nothing to load it. Its `dicttok` pass does not retokenize; it looks up the node's words, including in lazily loaded `*full` dictionaries, and gives them their dictionary attributes. Each call starts with empty `G()` variables. An analyzer cannot call itself, directly or through another analyzer. This completes what [findana](findana.md) started in 1.6.
Expand Down
2 changes: 1 addition & 1 deletion Help/markdown/callanalyzer.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ analyzerStr - type: str
**What runs on each call.** The called analyzer's passes run in order on the subtree, with these differences from running on a text of its own:

- Tokenizer passes are skipped, because the tree already exists.
- A `dicttok` or `dicttokz` pass does not tokenize. Instead it looks up every word under `pnode` in the dictionaries, including the lazily loaded `*full` files, which only load a word once it is seen. Each word gets its dictionary attributes (such as `pos`), and multi-word dictionary phrases are matched among `pnode`'s children.
- A `dicttok` or `dicttokz` pass does not tokenize. Instead it looks up every word under `pnode` in the dictionaries, including the lazily loaded `*full` files, which only load a word once it is seen. The called analyzer's lazy files add their attributes even to a word the caller's dictionaries already define: if the caller's dictionary gives `hello` the attribute `greeting=1`, `hello` keeps it and also gets its part of speech. Each word gets its dictionary attributes (such as `pos`), and multi-word dictionary phrases are matched among `pnode`'s children.
- Global variables (`G`) start empty on every call and are discarded afterwards, so the caller's global variables are neither visible nor changed.
- `G("$apppath")` is the called analyzer's folder.
- No per-pass `.tree` log files are written.
Expand Down
Loading