Skip to content
Mindtoeye edited this page Feb 16, 2013 · 2 revisions

All data flowing through a hoop graph is modeled as lists of key/value pairs. You can model a lot more structures and you can associate more than one value with a key but those topics will be discussed later on. First let's look at how key/value pairs can help you model your data and how you can use Hoop to create analysis pipelines.

You can think of keys and values as the columns and rows in a spreadsheet. The key is the very first column, where you frequently use that data to track indexes or counts. Each row is an entry with an index number and a series of values shown in the columns shown to the right. If you were to have two columns one with indexes and one with contents then that would be a typical list of key value pairs.

This all sounds rather abstract, so let's do an example. For instance, you might want to analyze text that comes in paragraphs. You could have a paragraph that looks like this:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce tristique pellentesque porttitor. Donec nulla ante, blandit sit amet tempus vitae, tincidunt volutpat justo. Quisque fermentum ipsum at felis ullamcorper nec malesuada nulla varius. Nulla sollicitudin lorem sed arcu suscipit eu cursus ante scelerisque. Quisque aliquet fringilla venenatis. Fusce justo urna, pharetra vel tempor et, vulputate id quam. Integer volutpat urna ac nisi gravida ac mollis leo auctor. Sed mattis tellus quam, at venenatis sapien.

To make this easier to analyze with linguistics tools you might want to split this text into sentences. For now we'll assume we have a hoop that can split the text perfectly based on periods or other end-of-line markers. In key/value terms your first transformation could generate something like this list:

Clone this wiki locally