From e37e1e2a0ef70348c9b56217ae722e2a953a6cc2 Mon Sep 17 00:00:00 2001 From: Yige Xu Date: Mon, 16 Sep 2019 16:30:43 +0800 Subject: [PATCH] update document in fastNLP/core/const.py --- fastNLP/core/const.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fastNLP/core/const.py b/fastNLP/core/const.py index ad5d1f1e..9bcea2d6 100644 --- a/fastNLP/core/const.py +++ b/fastNLP/core/const.py @@ -1,6 +1,5 @@ -""" -.. todo:: - doc +r""" +fastNLP包当中的field命名均符合一定的规范,该规范由fastNLP.Const类进行定义。 """ __all__ = [ @@ -50,11 +49,13 @@ class Const: @staticmethod def RAW_WORDS(i): + """得到第 i 个 ``RAW_WORDS`` 的命名""" i = int(i) + 1 return Const.RAW_WORD + str(i) @staticmethod def RAW_CHARS(i): + """得到第 i 个 ``RAW_CHARS`` 的命名""" i = int(i) + 1 return Const.RAW_CHAR + str(i)