diff --git a/.ipynb_checkpoints/app_spec-checkpoint.yml b/.ipynb_checkpoints/app_spec-checkpoint.yml index 101b89c..5b7ec46 100644 --- a/.ipynb_checkpoints/app_spec-checkpoint.yml +++ b/.ipynb_checkpoints/app_spec-checkpoint.yml @@ -1,16 +1,8 @@ -# input: -# your_param_name: -# value_type: 'int' -# output: -# your_result_name: -# value_type: 'int' - - input: Chinese_word: value_type: "str" style: - value_type: "[str]" + value_type: "str" value_range: ['藏头诗', '藏字诗'] output: Poetry: diff --git a/.ipynb_checkpoints/write_poem-checkpoint.py b/.ipynb_checkpoints/write_poem-checkpoint.py index 9b41385..5848dac 100644 --- a/.ipynb_checkpoints/write_poem-checkpoint.py +++ b/.ipynb_checkpoints/write_poem-checkpoint.py @@ -13,7 +13,7 @@ class WritePoem(): - def __init__(self,args): + def __init__(self, args): self.args = args logging.basicConfig(stream=sys.stdout, @@ -35,7 +35,7 @@ w2v_file = os.path.join(base_path, "vectors_poem.bin") self.w2v = Word2Vec(w2v_file) - RhymeWords.read_rhyme_words(os.path.join(base_path,'rhyme_words.txt')) + RhymeWords.read_rhyme_words(os.path.join(base_path, 'rhyme_words.txt')) if args.seed >= 0: np.random.seed(args.seed) diff --git a/app_spec.yml b/app_spec.yml index c88db25..5b7ec46 100644 --- a/app_spec.yml +++ b/app_spec.yml @@ -2,7 +2,7 @@ Chinese_word: value_type: "str" style: - value_type: "[str]" + value_type: "str" value_range: ['藏头诗', '藏字诗'] output: Poetry: diff --git a/write_poem.py b/write_poem.py index 9b41385..5848dac 100644 --- a/write_poem.py +++ b/write_poem.py @@ -13,7 +13,7 @@ class WritePoem(): - def __init__(self,args): + def __init__(self, args): self.args = args logging.basicConfig(stream=sys.stdout, @@ -35,7 +35,7 @@ w2v_file = os.path.join(base_path, "vectors_poem.bin") self.w2v = Word2Vec(w2v_file) - RhymeWords.read_rhyme_words(os.path.join(base_path,'rhyme_words.txt')) + RhymeWords.read_rhyme_words(os.path.join(base_path, 'rhyme_words.txt')) if args.seed >= 0: np.random.seed(args.seed)