parsely-dip 0.0.5__tar.gz → 0.0.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. {parsely_dip-0.0.5/src/parsely_dip.egg-info → parsely_dip-0.0.7}/PKG-INFO +18 -2
  2. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/README.md +17 -1
  3. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/pyproject.toml +1 -1
  4. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/src/parsely_dip/__init__.py +1 -1
  5. parsely_dip-0.0.7/src/parsely_dip/intents/scrum.py +33 -0
  6. {parsely_dip-0.0.5 → parsely_dip-0.0.7/src/parsely_dip.egg-info}/PKG-INFO +18 -2
  7. parsely_dip-0.0.5/src/parsely_dip/intents/scrum.py +0 -77
  8. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/LICENSE +0 -0
  9. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/setup.cfg +0 -0
  10. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/src/parsely_dip/cli/__init__.py +0 -0
  11. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/src/parsely_dip/cli/main.py +0 -0
  12. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/src/parsely_dip/engine/__init__.py +0 -0
  13. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/src/parsely_dip/engine/nlp.py +0 -0
  14. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/src/parsely_dip/engine/regex.py +0 -0
  15. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/src/parsely_dip/engine/registry.py +0 -0
  16. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/src/parsely_dip/engine/splitter.py +0 -0
  17. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/src/parsely_dip/engine/stanza_service.py +0 -0
  18. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/src/parsely_dip/intents/__init__.py +0 -0
  19. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/src/parsely_dip/intents/day.py +0 -0
  20. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/src/parsely_dip/intents/time.py +0 -0
  21. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/src/parsely_dip/intents/weather.py +0 -0
  22. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/src/parsely_dip/patterns/__init__.py +0 -0
  23. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/src/parsely_dip.egg-info/SOURCES.txt +0 -0
  24. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/src/parsely_dip.egg-info/dependency_links.txt +0 -0
  25. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/src/parsely_dip.egg-info/entry_points.txt +0 -0
  26. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/src/parsely_dip.egg-info/requires.txt +0 -0
  27. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/src/parsely_dip.egg-info/top_level.txt +0 -0
  28. {parsely_dip-0.0.5 → parsely_dip-0.0.7}/tests/test_runner.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: parsely-dip
3
- Version: 0.0.5
3
+ Version: 0.0.7
4
4
  Summary: PARSELY-DIP: Deterministic Intent Parser — RegEx and NLP pipeline for intent recognition
5
5
  Author-email: George Butiri <george@iseestudios.com>
6
6
  License: Proprietary
@@ -786,9 +786,19 @@ Every NLP pattern must be maximally specific. Include all words that disambiguat
786
786
 
787
787
  ```
788
788
  WEATHER_API_KEY=your_openweathermap_key
789
- STANZA_API_TOKEN=optional_security_token
789
+ STANZA_API_TOKEN=shared_secret_both_sides_use_this
790
790
  ```
791
791
 
792
+ #### About `STANZA_API_TOKEN`
793
+
794
+ The Stanza NLP service accepts an optional `X-Stanza-Token` header and — if `STANZA_API_TOKEN` is set in the service's environment — rejects requests whose header does not match. This keeps drive-by localhost scripts from hitting your running NLP service.
795
+
796
+ **Starting in 0.0.6, parsely-dip reads the same `STANZA_API_TOKEN` env var from its own process and sends it as `X-Stanza-Token` on every Stanza request.** Both sides must have the same value. Practical implications:
797
+
798
+ - **If your Stanza service has no token set:** do nothing. parsely-dip sends no header, service accepts the request, things work.
799
+ - **If your Stanza service has a token set:** export the same value in the environment where you call `parse()` (or load your `.env` before importing parsely-dip). Without it, the NLP layer silently falls through to LLM/no-match on every request.
800
+ - **If you run a web app that calls `parse()`:** make sure your app process inherits `STANZA_API_TOKEN` — it's not enough to have it in a file the app doesn't load.
801
+
792
802
  ### pyproject.toml Dependencies
793
803
 
794
804
  ```toml
@@ -931,6 +941,12 @@ Linguists and NLP researchers who understand constituency trees, dependency rela
931
941
 
932
942
  ## Status
933
943
 
944
+ v0.0.7 — `intents/scrum.py` demo no longer connects to an external SQLite DB; returns a hard-coded mock card instead. The demo's job is to show intent registration, not to query any specific project's data. Also tightens the bare `time` pattern with an end-of-string anchor so it no longer matches "time" as a substring inside longer queries.
945
+
946
+ v0.0.6 — Documents the client-side `STANZA_API_TOKEN` requirement for the NLP layer.
947
+
948
+ v0.0.5 — NLP layer sends `X-Stanza-Token` header from `STANZA_API_TOKEN` env var on every request to the Stanza service.
949
+
934
950
  v0.0.4 — Natural language tense in responses (future dates use "will be", past dates use "was"). "next" prefix word order fix. Additional "when will X be" query support.
935
951
 
936
952
  v0.0.3 — Dynamic parameter passing from both regex and NLP layers to intent handlers via context dict. `tell_day` intent with full date resolution: relative dates (tomorrow, in 3 days), fixed holidays (Christmas, Halloween, Veterans Day), moving holidays with calculators (Easter computus, Thanksgiving, Memorial Day, Labor Day, MLK Day, Mother's Day, Father's Day, Columbus Day, Presidents Day), numeric dates (4/1), weekday names, ordinal patterns (4th of July), "next" prefix for future occurrence, and correct past/present/future tense in responses. `word2number` integration for written numerals ("three" to 3). `check_ability_time` ability-check intent that verifies the target handler works before responding. CLI reorganized: `parsely start`, `parsely --chat` (pipeline testing), `parsely --test` (structure explorer). Hot-reload patterns from disk on every query via mtime check (no restart needed). NLP pattern for modal verb + action verb + noun slot matching. Visual constituency tree display. Expanded documentation with NLP vs RegEx tradeoff analysis, parse tree examples, slot-based matching, domain-specific skill files, and hardware instantiation vision. Proprietary license aligned with python-tapestry. GitHub repository live.
@@ -763,9 +763,19 @@ Every NLP pattern must be maximally specific. Include all words that disambiguat
763
763
 
764
764
  ```
765
765
  WEATHER_API_KEY=your_openweathermap_key
766
- STANZA_API_TOKEN=optional_security_token
766
+ STANZA_API_TOKEN=shared_secret_both_sides_use_this
767
767
  ```
768
768
 
769
+ #### About `STANZA_API_TOKEN`
770
+
771
+ The Stanza NLP service accepts an optional `X-Stanza-Token` header and — if `STANZA_API_TOKEN` is set in the service's environment — rejects requests whose header does not match. This keeps drive-by localhost scripts from hitting your running NLP service.
772
+
773
+ **Starting in 0.0.6, parsely-dip reads the same `STANZA_API_TOKEN` env var from its own process and sends it as `X-Stanza-Token` on every Stanza request.** Both sides must have the same value. Practical implications:
774
+
775
+ - **If your Stanza service has no token set:** do nothing. parsely-dip sends no header, service accepts the request, things work.
776
+ - **If your Stanza service has a token set:** export the same value in the environment where you call `parse()` (or load your `.env` before importing parsely-dip). Without it, the NLP layer silently falls through to LLM/no-match on every request.
777
+ - **If you run a web app that calls `parse()`:** make sure your app process inherits `STANZA_API_TOKEN` — it's not enough to have it in a file the app doesn't load.
778
+
769
779
  ### pyproject.toml Dependencies
770
780
 
771
781
  ```toml
@@ -908,6 +918,12 @@ Linguists and NLP researchers who understand constituency trees, dependency rela
908
918
 
909
919
  ## Status
910
920
 
921
+ v0.0.7 — `intents/scrum.py` demo no longer connects to an external SQLite DB; returns a hard-coded mock card instead. The demo's job is to show intent registration, not to query any specific project's data. Also tightens the bare `time` pattern with an end-of-string anchor so it no longer matches "time" as a substring inside longer queries.
922
+
923
+ v0.0.6 — Documents the client-side `STANZA_API_TOKEN` requirement for the NLP layer.
924
+
925
+ v0.0.5 — NLP layer sends `X-Stanza-Token` header from `STANZA_API_TOKEN` env var on every request to the Stanza service.
926
+
911
927
  v0.0.4 — Natural language tense in responses (future dates use "will be", past dates use "was"). "next" prefix word order fix. Additional "when will X be" query support.
912
928
 
913
929
  v0.0.3 — Dynamic parameter passing from both regex and NLP layers to intent handlers via context dict. `tell_day` intent with full date resolution: relative dates (tomorrow, in 3 days), fixed holidays (Christmas, Halloween, Veterans Day), moving holidays with calculators (Easter computus, Thanksgiving, Memorial Day, Labor Day, MLK Day, Mother's Day, Father's Day, Columbus Day, Presidents Day), numeric dates (4/1), weekday names, ordinal patterns (4th of July), "next" prefix for future occurrence, and correct past/present/future tense in responses. `word2number` integration for written numerals ("three" to 3). `check_ability_time` ability-check intent that verifies the target handler works before responding. CLI reorganized: `parsely start`, `parsely --chat` (pipeline testing), `parsely --test` (structure explorer). Hot-reload patterns from disk on every query via mtime check (no restart needed). NLP pattern for modal verb + action verb + noun slot matching. Visual constituency tree display. Expanded documentation with NLP vs RegEx tradeoff analysis, parse tree examples, slot-based matching, domain-specific skill files, and hardware instantiation vision. Proprietary license aligned with python-tapestry. GitHub repository live.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "parsely-dip"
7
- version = "0.0.5"
7
+ version = "0.0.7"
8
8
  description = "PARSELY-DIP: Deterministic Intent Parser — RegEx and NLP pipeline for intent recognition"
9
9
  readme = "README.md"
10
10
  license = {text = "Proprietary"}
@@ -1,6 +1,6 @@
1
1
  """PARSELY-DIP: Parsing And RegEx Syntactic Engine with Linguistic Yield - Deterministic Intent Parser"""
2
2
 
3
- __version__ = "0.0.5"
3
+ __version__ = "0.0.6"
4
4
 
5
5
  from pathlib import Path
6
6
  from parsely_dip.engine.regex import load_patterns, check_regex
@@ -0,0 +1,33 @@
1
+ """Intent: Scrum Card Operations (demo)
2
+
3
+ Demo intent showing how to register a parsely-dip intent and return a
4
+ formatted string. Returns hard-coded mock output so the example works without
5
+ any database or environment setup.
6
+
7
+ Replace this module in your own project to query your real data — this file
8
+ is just the registration pattern.
9
+ """
10
+
11
+ from parsely_dip.engine.registry import intent
12
+
13
+
14
+ MOCK_CARD_OUTPUT = """#42 [3pts] Example: Demo card title
15
+ Board: Demo Board
16
+ This is a mocked response from the parsely-dip scrum demo intent.
17
+ Replace this module to query your own card data.
18
+ Tasks: 2/3
19
+ [x] First demo task
20
+ [x] Second demo task
21
+ [ ] Third demo task"""
22
+
23
+
24
+ @intent('show_current_card')
25
+ def show_current_card():
26
+ """Show a (mocked) current card. Demo only — see module docstring."""
27
+ return MOCK_CARD_OUTPUT
28
+
29
+
30
+ @intent('read_current_card')
31
+ def read_current_card():
32
+ """Same data as show_current_card; kept for symmetry."""
33
+ return show_current_card()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: parsely-dip
3
- Version: 0.0.5
3
+ Version: 0.0.7
4
4
  Summary: PARSELY-DIP: Deterministic Intent Parser — RegEx and NLP pipeline for intent recognition
5
5
  Author-email: George Butiri <george@iseestudios.com>
6
6
  License: Proprietary
@@ -786,9 +786,19 @@ Every NLP pattern must be maximally specific. Include all words that disambiguat
786
786
 
787
787
  ```
788
788
  WEATHER_API_KEY=your_openweathermap_key
789
- STANZA_API_TOKEN=optional_security_token
789
+ STANZA_API_TOKEN=shared_secret_both_sides_use_this
790
790
  ```
791
791
 
792
+ #### About `STANZA_API_TOKEN`
793
+
794
+ The Stanza NLP service accepts an optional `X-Stanza-Token` header and — if `STANZA_API_TOKEN` is set in the service's environment — rejects requests whose header does not match. This keeps drive-by localhost scripts from hitting your running NLP service.
795
+
796
+ **Starting in 0.0.6, parsely-dip reads the same `STANZA_API_TOKEN` env var from its own process and sends it as `X-Stanza-Token` on every Stanza request.** Both sides must have the same value. Practical implications:
797
+
798
+ - **If your Stanza service has no token set:** do nothing. parsely-dip sends no header, service accepts the request, things work.
799
+ - **If your Stanza service has a token set:** export the same value in the environment where you call `parse()` (or load your `.env` before importing parsely-dip). Without it, the NLP layer silently falls through to LLM/no-match on every request.
800
+ - **If you run a web app that calls `parse()`:** make sure your app process inherits `STANZA_API_TOKEN` — it's not enough to have it in a file the app doesn't load.
801
+
792
802
  ### pyproject.toml Dependencies
793
803
 
794
804
  ```toml
@@ -931,6 +941,12 @@ Linguists and NLP researchers who understand constituency trees, dependency rela
931
941
 
932
942
  ## Status
933
943
 
944
+ v0.0.7 — `intents/scrum.py` demo no longer connects to an external SQLite DB; returns a hard-coded mock card instead. The demo's job is to show intent registration, not to query any specific project's data. Also tightens the bare `time` pattern with an end-of-string anchor so it no longer matches "time" as a substring inside longer queries.
945
+
946
+ v0.0.6 — Documents the client-side `STANZA_API_TOKEN` requirement for the NLP layer.
947
+
948
+ v0.0.5 — NLP layer sends `X-Stanza-Token` header from `STANZA_API_TOKEN` env var on every request to the Stanza service.
949
+
934
950
  v0.0.4 — Natural language tense in responses (future dates use "will be", past dates use "was"). "next" prefix word order fix. Additional "when will X be" query support.
935
951
 
936
952
  v0.0.3 — Dynamic parameter passing from both regex and NLP layers to intent handlers via context dict. `tell_day` intent with full date resolution: relative dates (tomorrow, in 3 days), fixed holidays (Christmas, Halloween, Veterans Day), moving holidays with calculators (Easter computus, Thanksgiving, Memorial Day, Labor Day, MLK Day, Mother's Day, Father's Day, Columbus Day, Presidents Day), numeric dates (4/1), weekday names, ordinal patterns (4th of July), "next" prefix for future occurrence, and correct past/present/future tense in responses. `word2number` integration for written numerals ("three" to 3). `check_ability_time` ability-check intent that verifies the target handler works before responding. CLI reorganized: `parsely start`, `parsely --chat` (pipeline testing), `parsely --test` (structure explorer). Hot-reload patterns from disk on every query via mtime check (no restart needed). NLP pattern for modal verb + action verb + noun slot matching. Visual constituency tree display. Expanded documentation with NLP vs RegEx tradeoff analysis, parse tree examples, slot-based matching, domain-specific skill files, and hardware instantiation vision. Proprietary license aligned with python-tapestry. GitHub repository live.
@@ -1,77 +0,0 @@
1
- """Intent: Scrum Card Operations
2
-
3
- Shows current card details from the scrum board.
4
- """
5
-
6
- import os
7
- import sqlite3
8
- from parsely_dip.engine.registry import intent
9
-
10
-
11
- def get_db_path():
12
- """Get path to bibliotech.db."""
13
- project_dir = os.getenv('CLAUDE_PROJECT_DIR', '.')
14
- return os.path.join(project_dir, 'db', 'bibliotech.db')
15
-
16
-
17
- def query(sql, params=(), single=False):
18
- """Simple query helper."""
19
- conn = sqlite3.connect(get_db_path())
20
- conn.row_factory = sqlite3.Row
21
- cur = conn.execute(sql, params)
22
- rows = [dict(r) for r in cur.fetchall()]
23
- conn.close()
24
- if single:
25
- return rows[0] if rows else None
26
- return rows
27
-
28
-
29
- @intent('show_current_card')
30
- def show_current_card():
31
- """Show the current card in Doing."""
32
- # Get cards in Doing (list_name = 'Doing') on bibliotech board
33
- cards = query("""
34
- SELECT c.card_id, c.card_title, c.card_descr, c.card_points,
35
- l.list_name, b.board_name
36
- FROM scrum_cards c
37
- JOIN scrum_lists l ON c.list_id = l.list_id
38
- JOIN scrum_boards b ON l.board_id = b.board_id
39
- WHERE l.list_name = 'Doing' AND c.card_is_archived = 0
40
- AND b.board_id = 4
41
- ORDER BY c.card_order
42
- """)
43
-
44
- if not cards:
45
- return "No cards in Doing."
46
-
47
- lines = []
48
- for card in cards:
49
- lines.append(f"#{card['card_id']} [{card['card_points']}pts] {card['card_title']}")
50
- lines.append(f" Board: {card['board_name']}")
51
- if card['card_descr']:
52
- lines.append(f" {card['card_descr']}")
53
-
54
- # Get tasks
55
- tasks = query("""
56
- SELECT task_text, task_done
57
- FROM scrum_tasks
58
- WHERE card_id = ?
59
- ORDER BY task_id
60
- """, (card['card_id'],))
61
-
62
- if tasks:
63
- done = sum(1 for t in tasks if t['task_done'])
64
- lines.append(f" Tasks: {done}/{len(tasks)}")
65
- for t in tasks:
66
- mark = 'x' if t['task_done'] else ' '
67
- lines.append(f" [{mark}] {t['task_text']}")
68
-
69
- lines.append("")
70
-
71
- return "\n".join(lines).strip()
72
-
73
-
74
- @intent('read_current_card')
75
- def read_current_card():
76
- """Read current cards — same data, LLM summarizes."""
77
- return show_current_card()
File without changes
File without changes