Skip to content

Commit

Permalink
fixes word_to_word event file creation for line event structure (#246)
Browse files Browse the repository at this point in the history
  • Loading branch information
derNarr authored Nov 28, 2023
1 parent 891197c commit be6c481
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions pyndl/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}')

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit be6c481

Please sign in to comment.