22 lines
663 B
Python
22 lines
663 B
Python
#!/usr/bin/env python3
|
|
import json
|
|
from scripts.InflectionProcessor import InflectionProcessor
|
|
|
|
# Load the sample data (jsonl format)
|
|
with open('samples/abgefahren.json', 'r', encoding='utf-8') as f:
|
|
lines = f.readlines()
|
|
|
|
# Initialize processor
|
|
processor = InflectionProcessor()
|
|
|
|
for line in lines:
|
|
data = json.loads(line.strip())
|
|
if data.get('pos') == 'adj':
|
|
print("Processing adj entry")
|
|
print("Original forms count:", len(data.get('forms', [])))
|
|
# Process the entry
|
|
processed = processor.process(data)
|
|
print("Processed forms:", processed.get('forms'))
|
|
print("Stats:", processor.stats)
|
|
break
|