Includes: - docs/: architecture, block-schema, migration-plan, product-specification - scripts/: bidi_table, decompose-decisions, extract-claims, seed-knowledge, etc. - skill-legal-decision/: SKILL.md + references + block-schema - skill-legal-assistant/: SKILL.md - skill-legal-docx/: SKILL.md + references - .claude/commands/: bidi-table skill - .taskmaster/: task config + PRDs - .gitignore: exclude legacy/, kiryat-yearim/, node_modules/, memory/ Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
41 lines
1.2 KiB
Python
41 lines
1.2 KiB
Python
#!/usr/bin/env python3
|
|
"""Test semantic search functions."""
|
|
|
|
import asyncio
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
sys.path.insert(0, str(Path(__file__).parent.parent / "mcp-server" / "src"))
|
|
|
|
from legal_mcp.services.db import search_similar_paragraphs, search_similar_case_law, search_precedents, init_schema
|
|
from legal_mcp.services.embeddings import embed_query
|
|
|
|
|
|
async def main():
|
|
await init_schema()
|
|
|
|
queries = [
|
|
"טענות קנייניות רוב דרוש בעלי דירות רכוש משותף",
|
|
"חניה תנועה חניות מצוקת חניה",
|
|
"היטל השבחה שמאי מכריע התערבות",
|
|
]
|
|
|
|
for query in queries:
|
|
print(f'=== שאילתה: "{query}" ===')
|
|
emb = await embed_query(query)
|
|
results = await search_precedents(emb, limit=3)
|
|
|
|
if not results:
|
|
print(" אין תוצאות")
|
|
else:
|
|
for i, r in enumerate(results):
|
|
score = r["score"]
|
|
cn = r["case_number"]
|
|
rtype = r["type"]
|
|
content = r["content"][:120].replace("\n", " ")
|
|
print(f" {i+1}. [{rtype}] {score:.3f} | {cn} | {content}")
|
|
print()
|
|
|
|
|
|
asyncio.run(main())
|