parsely-dip 0.0.6__tar.gz → 0.0.8__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.
- {parsely_dip-0.0.6/src/parsely_dip.egg-info → parsely_dip-0.0.8}/PKG-INFO +7 -1
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/README.md +6 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/pyproject.toml +1 -1
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/src/parsely_dip/engine/stanza_service.py +15 -10
- parsely_dip-0.0.8/src/parsely_dip/intents/scrum.py +33 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8/src/parsely_dip.egg-info}/PKG-INFO +7 -1
- parsely_dip-0.0.6/src/parsely_dip/intents/scrum.py +0 -77
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/LICENSE +0 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/setup.cfg +0 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/src/parsely_dip/__init__.py +0 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/src/parsely_dip/cli/__init__.py +0 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/src/parsely_dip/cli/main.py +0 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/src/parsely_dip/engine/__init__.py +0 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/src/parsely_dip/engine/nlp.py +0 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/src/parsely_dip/engine/regex.py +0 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/src/parsely_dip/engine/registry.py +0 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/src/parsely_dip/engine/splitter.py +0 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/src/parsely_dip/intents/__init__.py +0 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/src/parsely_dip/intents/day.py +0 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/src/parsely_dip/intents/time.py +0 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/src/parsely_dip/intents/weather.py +0 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/src/parsely_dip/patterns/__init__.py +0 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/src/parsely_dip.egg-info/SOURCES.txt +0 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/src/parsely_dip.egg-info/dependency_links.txt +0 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/src/parsely_dip.egg-info/entry_points.txt +0 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/src/parsely_dip.egg-info/requires.txt +0 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/src/parsely_dip.egg-info/top_level.txt +0 -0
- {parsely_dip-0.0.6 → parsely_dip-0.0.8}/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.
|
|
3
|
+
Version: 0.0.8
|
|
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
|
|
@@ -941,6 +941,12 @@ Linguists and NLP researchers who understand constituency trees, dependency rela
|
|
|
941
941
|
|
|
942
942
|
## Status
|
|
943
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
|
+
|
|
944
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.
|
|
945
951
|
|
|
946
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.
|
|
@@ -918,6 +918,12 @@ Linguists and NLP researchers who understand constituency trees, dependency rela
|
|
|
918
918
|
|
|
919
919
|
## Status
|
|
920
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
|
+
|
|
921
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.
|
|
922
928
|
|
|
923
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.
|
|
7
|
+
version = "0.0.8"
|
|
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"}
|
|
@@ -154,22 +154,27 @@ def restrict_access():
|
|
|
154
154
|
"""
|
|
155
155
|
Security middleware to restrict API access
|
|
156
156
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
Restrict API access to localhost only.
|
|
158
|
+
|
|
159
|
+
Source IP must be 127.0.0.1. Token auth (X-Stanza-Token) was REMOVED
|
|
160
|
+
2026-06-17 (C#1070 / George): the service is localhost-bound, so the IP
|
|
161
|
+
check is sufficient, and the token gate caused recurring issues (e.g.
|
|
162
|
+
blocking /health) for no added security on a local-only service.
|
|
163
|
+
Re-add token auth only if this service is ever exposed beyond localhost.
|
|
160
164
|
|
|
161
165
|
Returns:
|
|
162
|
-
None: Allows request to continue
|
|
163
|
-
tuple: (error_json, 403) if
|
|
166
|
+
None: Allows request to continue.
|
|
167
|
+
tuple: (error_json, 403) if the source IP is not localhost.
|
|
164
168
|
"""
|
|
165
|
-
# Check source IP
|
|
169
|
+
# Check source IP (localhost only) -- the sole access control now
|
|
166
170
|
if request.remote_addr != '127.0.0.1':
|
|
167
171
|
return jsonify({"error": "Access denied: Invalid source IP"}), 403
|
|
168
172
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
+
|
|
174
|
+
@app.route('/health', methods=['GET'])
|
|
175
|
+
def health():
|
|
176
|
+
"""Liveness check — returns 200 when the service is up. Public (no token)."""
|
|
177
|
+
return jsonify({"status": "ok", "service": "parsely-dip stanza"}), 200
|
|
173
178
|
|
|
174
179
|
|
|
175
180
|
def tree_to_json_with_all_info(tree, sentence, word_index=None):
|
|
@@ -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.
|
|
3
|
+
Version: 0.0.8
|
|
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
|
|
@@ -941,6 +941,12 @@ Linguists and NLP researchers who understand constituency trees, dependency rela
|
|
|
941
941
|
|
|
942
942
|
## Status
|
|
943
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
|
+
|
|
944
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.
|
|
945
951
|
|
|
946
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|