diff --git a/cornac/data/text.py b/cornac/data/text.py index 8545206cb..75c168431 100644 --- a/cornac/data/text.py +++ b/cornac/data/text.py @@ -132,7 +132,7 @@ def rm_numeric(t: str) -> str: def rm_punctuation(t: str) -> str: """ - Remove "!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~" from t. + Remove "!"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" from t. """ return t.translate(str.maketrans('', '', string.punctuation)) diff --git a/cornac/models/coe/coe.py b/cornac/models/coe/coe.py index 82cc4b0f0..0d2a008f1 100644 --- a/cornac/models/coe/coe.py +++ b/cornac/models/coe/coe.py @@ -18,7 +18,7 @@ import numpy as np import torch -"""Firstly, we define a helper function to generate\sample training ordinal triplets: +"""Firstly, we define a helper function to generate\\sample training ordinal triplets: Step 1: given rated item i, randomly choose item j and check whether rating of j is lower than i, if not randomly sample another item.