The KnowledgeGraph class has grown very large, making it difficult to maintain and test.
Proposed refactor:
- Split semantic data retrieval into a dedicated service/class.
- Move parser functions into a separate handler.
- Isolate WikiPage and category operations into helper classes.
- Ensure backward compatibility with existing hooks and JS integration.
Benefits: improved testability, readability, and maintainability.