 AI大模型千问 qwen 中文文档pdf = pdf def split_text(self, text: str) -> List[str]: if self.pdf: text = re.sub(r"\n{3,}", "\n", text) text = re.sub('\s', ' ', text) text = text.replace("\n\n", "") sent_sep_pattern = re.compile(0 码力 | 56 页 | 835.78 KB | 1 年前3 AI大模型千问 qwen 中文文档pdf = pdf def split_text(self, text: str) -> List[str]: if self.pdf: text = re.sub(r"\n{3,}", "\n", text) text = re.sub('\s', ' ', text) text = text.replace("\n\n", "") sent_sep_pattern = re.compile(0 码力 | 56 页 | 835.78 KB | 1 年前3
 pandas: powerful Python data analysis toolkit - 0.13.1Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide,0 码力 | 1219 页 | 4.81 MB | 1 年前3 pandas: powerful Python data analysis toolkit - 0.13.1Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide,0 码力 | 1219 页 | 4.81 MB | 1 年前3
 pandas: powerful Python data analysis toolkit - 0.14.0Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide,0 码力 | 1349 页 | 7.67 MB | 1 年前3 pandas: powerful Python data analysis toolkit - 0.14.0Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide,0 码力 | 1349 页 | 7.67 MB | 1 年前3
 pandas: powerful Python data analysis toolkit - 0.17.0Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, occurrences of pattern/regex in the Series/Index with some other string. Equivalent to str.replace() or re.sub(). Parameters pat : string Character sequence or regular expression repl : string Replacement0 码力 | 1787 页 | 10.76 MB | 1 年前3 pandas: powerful Python data analysis toolkit - 0.17.0Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, occurrences of pattern/regex in the Series/Index with some other string. Equivalent to str.replace() or re.sub(). Parameters pat : string Character sequence or regular expression repl : string Replacement0 码力 | 1787 页 | 10.76 MB | 1 年前3
 pandas: powerful Python data analysis toolkit - 0.15Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide,0 码力 | 1579 页 | 9.15 MB | 1 年前3 pandas: powerful Python data analysis toolkit - 0.15Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide,0 码力 | 1579 页 | 9.15 MB | 1 年前3
 pandas: powerful Python data analysis toolkit - 0.15.1Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide,0 码力 | 1557 页 | 9.10 MB | 1 年前3 pandas: powerful Python data analysis toolkit - 0.15.1Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide, Notes •Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. •Regular expressions will only substitute on strings, meaning you cannot provide,0 码力 | 1557 页 | 9.10 MB | 1 年前3
 动手学深度学习 v2.0"""将时间机器数据集加载到文本行的列表中""" with open(d2l.download('time_machine'), 'r') as f: lines = f.readlines() return [re.sub('[^A-Za-z]+', ' ', line).strip().lower() for line in lines] lines = read_time_machine() print(f'# """将SNLI数据集解析为前提、假设和标签""" def extract_text(s): # 删除我们不会使用的信息 s = re.sub('\\(', '', s) s = re.sub('\\)', '', s) # 用一个空格替换两个或多个连续的空格 s = re.sub('\\s{2,}', ' ', s) return s.strip() label_set = {'entailment':0 码力 | 797 页 | 29.45 MB | 1 年前3 动手学深度学习 v2.0"""将时间机器数据集加载到文本行的列表中""" with open(d2l.download('time_machine'), 'r') as f: lines = f.readlines() return [re.sub('[^A-Za-z]+', ' ', line).strip().lower() for line in lines] lines = read_time_machine() print(f'# """将SNLI数据集解析为前提、假设和标签""" def extract_text(s): # 删除我们不会使用的信息 s = re.sub('\\(', '', s) s = re.sub('\\)', '', s) # 用一个空格替换两个或多个连续的空格 s = re.sub('\\s{2,}', ' ', s) return s.strip() label_set = {'entailment':0 码力 | 797 页 | 29.45 MB | 1 年前3
 pandas: powerful Python data analysis toolkit - 1.3.2string The replace method can also take a callable as replacement. It is called on every pat using re.sub(). The callable should expect one positional argument (a regex object) and return a string. 556 replace('col_heading', '')\ .replace('row_heading', '') import re html = re.sub(r'col[0-9]+', lambda x: x.group().replace('col', 'c'), html) html = re.sub(r'row[0-9]+', lambda x: x.group().replace('row', 'r'), html) Notes • Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. • Regular expressions will only substitute on strings, meaning you cannot provide0 码力 | 3509 页 | 14.01 MB | 1 年前3 pandas: powerful Python data analysis toolkit - 1.3.2string The replace method can also take a callable as replacement. It is called on every pat using re.sub(). The callable should expect one positional argument (a regex object) and return a string. 556 replace('col_heading', '')\ .replace('row_heading', '') import re html = re.sub(r'col[0-9]+', lambda x: x.group().replace('col', 'c'), html) html = re.sub(r'row[0-9]+', lambda x: x.group().replace('row', 'r'), html) Notes • Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. • Regular expressions will only substitute on strings, meaning you cannot provide0 码力 | 3509 页 | 14.01 MB | 1 年前3
 pandas: powerful Python data analysis toolkit - 1.3.3string The replace method can also take a callable as replacement. It is called on every pat using re.sub(). The callable should expect one positional argument (a regex object) and return a string. 2.9 replace('col_heading', '')\ .replace('row_heading', '') import re html = re.sub(r'col[0-9]+', lambda x: x.group().replace('col', 'c'), html) html = re.sub(r'row[0-9]+', lambda x: x.group().replace('row', 'r'), html) Notes • Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. • Regular expressions will only substitute on strings, meaning you cannot provide0 码力 | 3603 页 | 14.65 MB | 1 年前3 pandas: powerful Python data analysis toolkit - 1.3.3string The replace method can also take a callable as replacement. It is called on every pat using re.sub(). The callable should expect one positional argument (a regex object) and return a string. 2.9 replace('col_heading', '')\ .replace('row_heading', '') import re html = re.sub(r'col[0-9]+', lambda x: x.group().replace('col', 'c'), html) html = re.sub(r'row[0-9]+', lambda x: x.group().replace('row', 'r'), html) Notes • Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. • Regular expressions will only substitute on strings, meaning you cannot provide0 码力 | 3603 页 | 14.65 MB | 1 年前3
 pandas: powerful Python data analysis toolkit - 1.3.4string The replace method can also take a callable as replacement. It is called on every pat using re.sub(). The callable should expect one positional argument (a regex object) and return a string. 582 replace('col_heading', '')\ .replace('row_heading', '') import re html = re.sub(r'col[0-9]+', lambda x: x.group().replace('col', 'c'), html) html = re.sub(r'row[0-9]+', lambda x: x.group().replace('row', 'r'), html) Notes • Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. • Regular expressions will only substitute on strings, meaning you cannot provide0 码力 | 3605 页 | 14.68 MB | 1 年前3 pandas: powerful Python data analysis toolkit - 1.3.4string The replace method can also take a callable as replacement. It is called on every pat using re.sub(). The callable should expect one positional argument (a regex object) and return a string. 582 replace('col_heading', '')\ .replace('row_heading', '') import re html = re.sub(r'col[0-9]+', lambda x: x.group().replace('col', 'c'), html) html = re.sub(r'row[0-9]+', lambda x: x.group().replace('row', 'r'), html) Notes • Regex substitution is performed under the hood with re.sub. The rules for substitution for re.sub are the same. • Regular expressions will only substitute on strings, meaning you cannot provide0 码力 | 3605 页 | 14.68 MB | 1 年前3
共 31 条
- 1
- 2
- 3
- 4













