fix: update all Stage 2 references to Stage 3 CANONICAL type counts
Comprehensive update of type count references from Stage 2 (31 nouns + 40 verbs) to Stage 3 CANONICAL (42 nouns + 127 verbs) across entire codebase. Changes (23 files): - Core architecture: Memory tracking comments, speedup calculations - Tests: Type count assertions, enum index expectations, memory benchmarks - CLI: User-visible type count output - Augmentations: Type detection comments - Documentation: Architecture docs, guides, performance docs - Type embeddings: Regenerated for all 169 types (338KB) Specific updates: - 31 → 42 (noun count): 38 occurrences - 40 → 127 (verb count): 24 occurrences - 124 → 168 bytes (noun array size): 5 occurrences - 160 → 508 bytes (verb array size): 5 occurrences - 284 → 676 bytes (total type tracking): 12 occurrences - Enum indices updated to match Stage 3 reordering Type embeddings regenerated: - 42 noun embeddings (64.5 KB) - 127 verb embeddings (194.8 KB) - Total: 338 KB (was 108.8 KB) All constants, arrays, and tests now consistent with Stage 3 taxonomy. Fixes #v5.5.1-type-count-migration
This commit is contained in:
parent
f57732be90
commit
823cd5cf1b
23 changed files with 106 additions and 106 deletions
|
|
@ -245,7 +245,7 @@ return results.slice(offset, offset + limit)
|
|||
## Type-Aware NLP Features
|
||||
|
||||
### 1. Dynamic Field Discovery
|
||||
- **No Hardcoded Fields**: Only NounType/VerbType taxonomies are fixed (30+ noun, 40+ verb types)
|
||||
- **No Hardcoded Fields**: Only NounType/VerbType taxonomies are fixed (42 noun, 127 verb types)
|
||||
- **Real Data Learning**: Field affinity learned from actual indexed entities
|
||||
- **Semantic Matching**: "by" → "author" via embedding similarity (87% confidence)
|
||||
- **Type Context**: Documents have different fields than Persons or Organizations
|
||||
|
|
@ -287,7 +287,7 @@ return results.slice(offset, offset + limit)
|
|||
|
||||
Where:
|
||||
- n = number of entities in database
|
||||
- t = number of types (70 total: 30 noun + 40 verb)
|
||||
- t = number of types (169 total: 42 noun + 127 verb)
|
||||
- f = number of fields for detected entity type (typically 5-15)
|
||||
|
||||
### Scalability
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ Where:
|
|||
- `k` = number of results returned
|
||||
- `m` = number of patterns to check
|
||||
- `f` = number of fields for entity type
|
||||
- `t` = number of types (30+ nouns, 40+ verbs)
|
||||
- `t` = number of types (42 nouns, 127 verbs)
|
||||
|
||||
## Architecture Deep Dive
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ The NLP processor uses **zero hardcoded fields** - everything is discovered dyna
|
|||
|
||||
```typescript
|
||||
class NaturalLanguageProcessor {
|
||||
// Pre-embedded NounTypes (30+) and VerbTypes (40+) - ONLY hardcoded vocabularies
|
||||
// Pre-embedded NounTypes (42) and VerbTypes (127) - ONLY hardcoded vocabularies
|
||||
private nounTypeEmbeddings = new Map<string, Vector>()
|
||||
private verbTypeEmbeddings = new Map<string, Vector>()
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ class NaturalLanguageProcessor {
|
|||
5. **Query Optimization**: Process low-cardinality type-specific fields first
|
||||
|
||||
**Performance Characteristics:**
|
||||
- Type detection: O(t) where t = 70 total types (30 noun + 40 verb)
|
||||
- Type detection: O(t) where t = 169 total types (42 noun + 127 verb)
|
||||
- Field matching: O(f) where f = fields for detected type (typically 5-15)
|
||||
- Validation: O(1) lookup in type-field affinity map
|
||||
- No hardcoded assumptions - learns from actual data patterns
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
Brainy's **Noun-Verb Taxonomy** achieves **universal coverage** of all human knowledge through **infinite expressiveness**:
|
||||
|
||||
- **31 Noun Types × 40 Verb Types = 1,240 Base Combinations**
|
||||
- **42 Noun Types × 127 Verb Types = 5,334 Base Combinations**
|
||||
- **Unlimited Metadata Fields = ∞ Domain Specificity**
|
||||
- **Multi-hop Graph Traversals = ∞ Relationship Complexity**
|
||||
- **Result: Can Model ANY Data in ANY Industry**
|
||||
|
|
@ -95,7 +95,7 @@ await brain.sync.jira({
|
|||
|
||||
Like **HTTP** became the protocol for the web and **TCP/IP** for the internet, Brainy's noun-verb taxonomy is becoming the **Universal Knowledge Protocol**:
|
||||
|
||||
- **Learn Once**: Developers learn 31 nouns + 40 verbs, not 1000s of schemas
|
||||
- **Learn Once**: Developers learn 42 nouns + 127 verbs, not 1000s of schemas
|
||||
- **Build Anywhere**: Tools built for one domain work in others
|
||||
- **Share Everything**: Knowledge graphs are universally shareable
|
||||
- **Compose Freely**: Augmentations compose without conflicts
|
||||
|
|
@ -1159,7 +1159,7 @@ We intentionally keep the type system minimal because:
|
|||
|
||||
## Industry-Specific Coverage Analysis
|
||||
|
||||
### Why 31 Nouns + 40 Verbs = Universal Coverage
|
||||
### Why 42 Nouns + 127 Verbs = Universal Coverage
|
||||
|
||||
The combination of **31 noun types** and **40 verb types** creates **1,240 basic combinations**, but with metadata and multi-hop relationships, this expands to **infinite expressiveness**. Here's how it covers every industry:
|
||||
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ Brainy automatically detects what TYPE of data you're importing:
|
|||
{ latitude: 37.7, longitude: -122.4, city: 'SF' }
|
||||
```
|
||||
|
||||
**31 noun types** and **40 verb types** cover EVERYTHING!
|
||||
**42 noun types and 127 verb types** cover EVERYTHING!
|
||||
|
||||
## Relationship Detection
|
||||
|
||||
|
|
@ -382,7 +382,7 @@ await brain.find('posts by users following Alice with >10 comments')
|
|||
|
||||
**Zero Configuration**: Works perfectly out of the box
|
||||
**Maximum Intelligence**: AI understands your data's meaning
|
||||
**Universal Protocol**: 31 nouns × 40 verbs = ANY data model
|
||||
**Universal Protocol**: 42 nouns × 127 verbs = ANY data model
|
||||
**Delightful DX**: Simple, clean, modern API
|
||||
|
||||
## The ONE Method Philosophy
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ Brainy's Neural Extraction system uses embeddings and a sophisticated NounType t
|
|||
|
||||
## NounType Taxonomy
|
||||
|
||||
Brainy uses a 30+ type taxonomy for entity classification:
|
||||
Brainy uses a 42-noun + 127-verb type taxonomy for entity classification:
|
||||
|
||||
### Core Types
|
||||
- **Person** - Individual humans
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue