@staticmethod
def get_terms(text):
    """
        Takes a text string and returns a list of dictionaries.
        Each dictionary has two key "negated" and "string"

        String 'a "b c" d "e" 'f g' h -i -"j k" l -'m n' o OR p'

        Results in:
        [
            {'negated': False, 'string': 'a'}, {'negated': False, 'string': 'b c'},
            {'negated': False, 'string': 'd'}, {'negated': False, 'string': 'e'},
            {'negated': False, 'string': 'f g'}, {'negated': False, 'string': 'h'},
            {'negated': True, 'string': 'i'}, {'negated': True, 'string': 'j k'},
            {'negated': False, 'string': 'l'}, {'negated': True, 'string': 'm n'},
            {'negated': False, 'string': 'o'}, {'negated': False, 'string': 'OR'},
            {'negated': False, 'string': 'p'}
        ]
        """
    QUOTES = ['"', "'"]
    NEGATION_CHARACTER = '-'
    SPACE_CHARACTER = ' '
    inside_quotes = False
    negated = False
    term = []
    terms = []
    for letter in text:
        if not inside_quotes and letter == NEGATION_CHARACTER:
            negated = True
        elif letter in QUOTES:
            if inside_quotes:
                if term:
                    terms.append({'meta': False, 'negated': negated,
                        'string': ''.join(term)})
                    negated = False
                    term = []
            inside_quotes = not inside_quotes
        elif not inside_quotes and letter == SPACE_CHARACTER:
            if term:
                if term == ['O', 'R']:
                    meta = True
                else:
                    meta = False
                terms.append({'meta': meta, 'negated': negated, 'string':
                    ''.join(term)})
                negated = False
                term = []
        else:
            term.append(letter)
    if term:
        terms.append({'meta': False, 'negated': negated, 'string': ''.join(
            term)})
    return terms
