import collections
import re


def isi_text_to_dic(text):
    """
    This function takes in any ISI WOS plain text formatted string and turns it
    into a dictionary where the keys are the two letter leading keys and the
    values are a list of the strings under that key.
    """
    fields = collections.defaultdict(list)
    curr = ''
    for line in re.split(r'\n+', text):
        name = line[:2]
        value = line[3:]
        if not name.isspace():
            curr = name
        if not curr.isspace():
            fields[curr].append(value)
    return fields