diff --git a/pyndl/preprocess.py b/pyndl/preprocess.py index 7a98af7..8aa1219 100644 --- a/pyndl/preprocess.py +++ b/pyndl/preprocess.py @@ -322,8 +322,12 @@ def gen_occurrences(words): occurrences.append(("_".join(cues), word)) return occurrences elif event_structure == 'line': - # (cues, outcomes) with empty outcomes - return [('_'.join(words), ''), ] + #{"trigrams_to_word", "word_to_word", "bigrams_to_word"} + if cue_structure in ("trigrams_to_word", "bigrams_to_word"): + # (cues, outcomes) with empty outcomes + return [('_'.join(words), ''), ] + else: + return [('_'.join(words), '_'.join(words)), ] else: raise ValueError('gen_occurrences should be one of {"consecutive_words", "word_to_word", "line"}') diff --git a/pyproject.toml b/pyproject.toml index d9e1688..6e9c395 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pyndl" -version = "1.1.2" +version = "1.2.0" description = "Naive discriminative learning implements learning and classification models based on the Rescorla-Wagner equations." license = "MIT"