I'm working on a way to capture metadata about nodes in a document. I'm planning to use…
- User
I'm working on a way to capture metadata about nodes in a document. I'm planning to use indentation as a way to work through this. I've hit on three rules, but I'm still struggling to work them into an algorithm I can use. The rules are:
- if indent of current line = to indent of following line, there are no sub nodes of the current line
- if indent of current line is > indent of following line, there are sub nodes of the current line
- if indent of current line is < the indent of the following line, then i have found the last line in this node and the next line is a different node.
I'm looking to combine these rules into logic that will help me transform documents with this node structure into structured data that I can map with standardized metadata, but that's the end goal. For now, let's discuss these rules I've come up with
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.