前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Python基础学习笔记之(一)(华工大神)

Python基础学习笔记之(一)(华工大神)

作者头像
bear_fish
发布2018-09-20 15:43:31
5660
发布2018-09-20 15:43:31
举报

Python基础学习笔记之(一)

zouxy09@qq.com

http://blog.csdn.net/zouxy09

       前段时间参加微软的windows Azure云计算的一个小培训,其中Python被用的还是蛮多的。另外,一些大公司如Google(实现web爬虫和搜索引擎中的很多组件),Yahoo(管理讨论组),NASA,YouTube(视频分享服务大部分由Python编写)等等对Python都很青睐。而国内的豆瓣可以说是给Python予千万宠爱了,它的前台后台清一色的都是Python的身影。另外,我们计算机视觉这块用的很频繁的OpenCV也提供了Python的接口,网上还提供了不少Python的机器学习的库(例如milkscikit-learnPylearn2等),Deep learning的一个知名的Python的库theano,自然语言处理的库NLTK。此外,Python为数学、科学、工程和绘图等提供了有趣的标准库(例如,NumPy ,SciPy和matplotlib等),这使得一部分Matlab的使用者慢慢的倒戈到Python阵营,没办法,谁叫Matlab贵呢!当然了,Python不仅是免费,它还具有Matlab较弱或者没有的一些其他的功能,例如文件管理、界面设计、网络通信等。这就使得Python占有的用户群更广。

       Python是“蟒蛇”的意思,这个名字是有点故事的。当然了,这个得追溯到它的发明者Guido van Rossum。在1989年圣诞节期间,Guido身处阿姆斯特丹。这个都市的美丽和繁华没能填满Guido空虚的内心,周边的喧闹使他内心的寂寞无处安放(夜的黑已不再纯粹,哈哈)。为了打发这种无趣,Guido决心为他之前孕育的ABC语言开发一个插件,这个插件就是大名鼎鼎的Python(男人因为孤独而优秀啊!)。一个新的脚本解释程序就此诞生。在给这个孩子起名字的时候,Guido取其所爱的一个叫Monty Python的喜剧团体的“Python”。

       官方点说,Python是一种解释型、面向对象、动态数据类型的高级程序设计语言。Python语法简洁而清晰,具有丰富和强大的类库。它常被昵称为胶水语言,它能够很轻松的把用其他语言制作的各种模块(尤其是C/C++)轻松地联结在一起。自从20世纪90年代初Python语言诞生至今,它逐渐被广泛应用于处理系统管理任务和Web编程。Python已经成为最受欢迎的程序设计语言之一。2011年1月,它被TIOBE编程语言排行榜评为2010年度语言。自从2004年以后,python的使用率是呈线性增长。

       这篇博文是我看了“中谷教育-Python视频教程”的一个笔记,记录的是一些Python的学习基础,整理到这里,一是总结,二是备查。网上也有比较好的教程,例如“Python 精要参考”。

目录

一、安装、编译与运行

二、变量、运算与表达式

三、数据类型

      1、数字

2、字符串

3、元组

4、列表

5、字典

四、流程控制

1、if-else

2、for

3、while

4、switch

五、函数

1、自定义函数

2、Lambda函数

3、Python内置函数

六、包与模块

1、模块module

2、包package

七、正则表达式

1、元字符

2、常用函数

3、分组 

4、一个小实例-爬虫

八、深拷贝与浅拷贝

九、文件与目录

1、文件读写

2、OS模块

3、目录遍历

十、异常处理

一、安装、编译与运行

       Python的安装很容易,直接到官网:http://www.python.org/下载安装就可以了。Ubuntu一般都预安装了。没有的话,就可以#apt-get install python。Windows的话直接下载msi包安装即可。Python 程序是通过解释器执行的,所以安装后,可以看到Python提供了两个解析器,一个是IDLE (Python GUI),一个是Python (command line)。前者是一个带GUI界面的版本,后者实际上和在命令提示符下运行python是一样的。运行解释器后,就会有一个命令提示符>>>,在提示符后键入你的程序语句,键入的语句将会立即执行。就像Matlab一样。

       另外,Matlab有.m的脚步文件,python也有.py后缀的脚本文件,这个文件除了可以解释执行外,还可以编译运行,编译后运行速度要比解释运行要快。

       例如,我要打印一个helloWorld。

方法1:直接在解释器中,>>> print ‘helloWorld’。

方法2:将这句代码写到一个文件中,例如hello.py。运行这个文件有三种方式:

1)在终端中:python hello.py

2)先编译成.pyc文件:

import py_compile

py_compile.compile("hello.py")

再在终端中:python hello.pyc

3)在终端中:

python -O -m py_compile hello.py

python hello.pyo

       编译成.pyc和.pyo文件后,执行的速度会更快。所以一般一些重复性并多次调用的代码会被编译成这两种可执行的方式来待调用。

二、变量、运算与表达式

         这里没什么好说的,有其他语言的编程基础的话都没什么问题。和Matlab的相似度比较大。这块差别不是很大。具体如下:

         需要注意的一个是:5/2 等于2,5.0/2才等于2.5。

[python] view plaincopy

  1. ###################################
  2. ### compute #######
  3. # raw_input() get input from keyboard to string type
  4. # So we should transfer to int type
  5. # Some new support computing type:
  6. # and or not in is < <= != == | ^ & << + - / % ~ **
  7. print 'Please input a number:'
  8. number = int(raw_input())   
  9. number += 1
  10. print number**2 # ** means ^
  11. print number and 1
  12. print number or 1
  13. print not number  
  14. 5/2 # is 2
  15. 5.0/2 # is 2.5, should be noted

三、数据类型

1、数字

         通常的int, long,float,long等等都被支持。而且会看你的具体数字来定义变量的类型。如下:

[python] view plaincopy

  1. ###################################
  2. ### type of value #######
  3. # int, long, float
  4. # do not need to define the type of value, python will
  5. # do this according to your value
  6. num = 1 # stored as int type
  7. num = 1111111111111 # stored as long int type
  8. num = 1.0 # stored as float type
  9. num = 12L # L stands for long type
  10. num = 1 + 12j # j stands for complex type
  11. num = '1' # string type

2、字符串

         单引号,双引号和三引号都可以用来定义字符串。三引号可以定义特别格式的字符串。字符串作为一种序列类型,支持像Matlab一样的索引访问和切片访问。

[python] view plaincopy

  1. ###################################
  2. ### type of string #######
  3. num = "1" # string type
  4. num = "Let's go" # string type
  5. num = "He's \"old\"" # string type
  6. mail = "Xiaoyi: \n hello \n I am you!"
  7. mail = """Xiaoyi:
  8.     hello
  9.     I am you!
  10.     """ # special string format
  11. string = 'xiaoyi' # get value by index
  12. copy = string[0] + string[1] + string[2:6] # note: [2:6] means [2 5] or[2 6)
  13. copy = string[:4] # start from 1
  14. copy = string[2:] # to end
  15. copy = string[::1] # step is 1, from start to end
  16. copy = string[::2] # step is 2
  17. copy = string[-1] # means 'i', the last one
  18. copy = string[-4:-2:-1] # means 'yoa', -1 step controls direction
  19. memAddr = id(num) # id(num) get the memory address of num
  20. type(num) # get the type of num

3、元组

         元组tuple用()来定义。相当于一个可以存储不同类型数据的一个数组。可以用索引来访问,但需要注意的一点是,里面的元素不能被修改。

[python] view plaincopy

  1. ###################################
  2. ### sequence type #######
  3. ## can access the elements by index or slice
  4. ## include: string, tuple(or array? structure? cell?), list
  5. # basis operation of sequence type
  6. firstName = 'Zou'
  7. lastName = 'Xiaoyi'
  8. len(string) # the length
  9. name = firstName + lastName # concatenate 2 string
  10. firstName * 3 # repeat firstName 3 times
  11. 'Z' in firstName # check contain or not, return true
  12. string = '123'
  13. max(string)  
  14. min(string)  
  15. cmp(firstName, lastName) # return 1, -1 or 0
  16. ## tuple(or array? structure? cell?)
  17. ## define this type using ()
  18. user = ("xiaoyi", 25, "male")  
  19. name = user[0]  
  20. age = user[1]  
  21. gender = user[2]  
  22. t1 = () # empty tuple
  23. t2 = (2, ) # when tuple has only one element, we should add a extra comma
  24. user[1] = 26 # error!! the elements can not be changed
  25. name, age, gender = user # can get three element respectively
  26. a, b, c = (1, 2, 3)  

4、列表

         列表list用[]来定义。它和元组的功能一样,不同的一点是,里面的元素可以修改。List是一个类,支持很多该类定义的方法,这些方法可以用来对list进行操作。

[python] view plaincopy

  1. ## list type (the elements can be modified)
  2. ## define this type using []
  3. userList = ["xiaoyi", 25, "male"]  
  4. name = userList[0]  
  5. age = userList[1]  
  6. gender = userList[2]  
  7. userList[3] = 88888 # error! access out of range, this is different with Matlab
  8. userList.append(8888) # add new elements
  9. "male" in userList # search
  10. userList[2] = 'female' # can modify the element (the memory address not change)
  11. userList.remove(8888) # remove element
  12. userList.remove(userList[2]) # remove element
  13. del(userList[1]) # use system operation api
  14. ## help(list.append)
  15. ################################
  16. ######## object and class ######
  17. ## object = property + method
  18. ## python treats anything as class, here the list type is a class,
  19. ## when we define a list "userList", so we got a object, and we use
  20. ## its method to operate the elements

5、字典

         字典dictionary用{}来定义。它的优点是定义像key-value这种键值对的结构,就像struct结构体的功能一样。它也支持字典类支持的方法进行创建和操作。

[python] view plaincopy

  1. ################################
  2. ######## dictionary type ######
  3. ## define this type using {}
  4. item = ['name', 'age', 'gender']  
  5. value = ['xiaoyi', '25', 'male']  
  6. zip(item, value) # zip() will produce a new list: 
  7. # [('name', 'xiaoyi'), ('age', '25'), ('gender', 'male')]
  8. # but we can not define their corresponding relationship
  9. # and we can define this relationship use dictionary type
  10. # This can be defined as a key-value manner
  11. # dic = {key1: value1, key2: value2, ...}, key and value can be any type
  12. dic = {'name': 'xiaoyi', 'age': 25, 'gender': 'male'}  
  13. dic = {1: 'zou', 'age':25, 'gender': 'male'}  
  14. # and we access it like this: dic[key1], the key as a index
  15. print dic['name']  
  16. print dic[1]  
  17. # another methods create dictionary
  18. fdict = dict(['x', 1], ['y', 2]) # factory mode
  19. ddict = {}.fromkeys(('x', 'y'), -1) # built-in mode, default value is the same which is none
  20. # access by for circle
  21. for key in dic  
  22. print key  
  23. print dic[key]  
  24. # add key or elements to dictionary, because dictionary is out of sequence,
  25. # so we can directly and a key-value pair like this:
  26. dic['tel'] = 88888
  27. # update or delete the elements
  28. del dic[1] # delete this key
  29. dic.pop('tel') # show and delete this key
  30. dic.clear() # clear the dictionary
  31. del dic # delete the dictionary
  32. dic.get(1) # get the value of key
  33. dic.get(1, 'error') # return a user-define message if the dictionary do not contain the key
  34. dic.keys()  
  35. dic.values()  
  36. dic.has_key(key)  
  37. # dictionary has many operations, please use help to check out

四、流程控制

在这块,Python与其它大多数语言有个非常不同的地方,Python语言使用缩进块来表示程序逻辑(其它大多数语言使用大括号等)。例如:

if age < 21:

    print("你不能买酒。")

    print("不过你能买口香糖。")

print("这句话处于if语句块的外面。")

         这个代码相当于c语言的:

if (age < 21)

{

    print("你不能买酒。")

    print("不过你能买口香糖。")

}

print("这句话处于if语句块的外面。")

       可以看到,Python语言利用缩进表示语句块的开始和退出(Off-side规则),而非使用花括号或者某种关键字。增加缩进表示语句块的开始(注意前面有个:号),而减少缩进则表示语句块的退出。根据PEP的规定,必须使用4个空格来表示每级缩进(不清楚4个空格的规定如何,在实际编写中可以自定义空格数,但是要满足每级缩进间空格数相等)。使用Tab字符和其它数目的空格虽然都可以编译通过,但不符合编码规范。

       为了使我们自己编写的程序能很好的兼容别人的程序,我们最好还是按规范来,用四个空格来缩减(注意,要么都是空格,要是么都制表符,千万别混用)。

1、if-else

         If-else用来判断一些条件,以执行满足某种条件的代码。

[python] view plaincopy

  1. ################################
  2. ######## procedure control #####
  3. ## if else
  4. if expression: # bool type and do not forget the colon
  5.     statement(s) # use four space key 
  6. if expression:   
  7. statement(s) # error!!!! should use four space key 
  8. if 1<2:  
  9. print 'ok, ' # use four space key
  10. print 'yeah' # use the same number of space key
  11. if True: # true should be big letter True
  12. print 'true'
  13. def fun():  
  14. return 1
  15. if fun():  
  16. print 'ok'
  17. else:  
  18. print 'no'
  19. con = int(raw_input('please input a number:'))  
  20. if con < 2:  
  21. print 'small'
  22. elif con > 3:  
  23. print 'big'
  24. else:  
  25. print 'middle'
  26. if 1 < 2:  
  27. if 2 < 3:  
  28. print 'yeah'
  29. else:  
  30. print 'no'
  31. print 'out'
  32. else:  
  33. print 'bad'
  34. if 1<2 and 2<3 or 2 < 4 not 0: # and, or, not
  35. print 'yeah'

2、for

         for的作用是循环执行某段代码。还可以用来遍历我们上面所提到的序列类型的变量。

[python] view plaincopy

  1. ################################
  2. ######## procedure control #####
  3. ## for
  4. for iterating_val in sequence:  
  5.     statements(s)  
  6. # sequence type can be string, tuple or list
  7. for i in "abcd":  
  8. print i  
  9. for i in [1, 2, 3, 4]:  
  10. print i  
  11. # range(start, end, step), if not set step, default is 1, 
  12. # if not set start, default is 0, should be noted that it is [start, end), not [start, end]
  13. range(5) # [0, 1, 2, 3, 4]
  14. range(1, 5) # [1, 2, 3, 4]
  15. range(1, 10, 2) # [1, 3, 5, 7, 9]
  16. for i in range(1, 100, 1):   
  17. print i  
  18. # ergodic for basis sequence
  19. fruits = ['apple', 'banana', 'mango']  
  20. for fruit in range(len(fruits)):   
  21. print 'current fruit: ', fruits[fruit]  
  22. # ergodic for dictionary
  23. dic = {1: 111, 2: 222, 5: 555}  
  24. for x in dic:  
  25. print x, ': ', dic[x]  
  26. dic.items() # return [(1, 111), (2, 222), (5, 555)]
  27. for key,value in dic.items(): # because we can: a,b=[1,2]
  28. print key, ': ', value  
  29. else:  
  30. print 'ending'
  31. ################################
  32. import time  
  33. # we also can use: break, continue to control process
  34. for x in range(1, 11):  
  35. print x  
  36.     time.sleep(1) # sleep 1s
  37. if x == 3:  
  38. pass # do nothing
  39. if x == 2:  
  40. continue
  41. if x == 6:  
  42. break
  43. if x == 7:    
  44.         exit() # exit the whole program
  45. print '#'*50

3、while

         while的用途也是循环。它首先检查在它后边的循环条件,若条件表达式为真,它就执行冒号后面的语句块,然后再次测试循环条件,直至为假。冒号后面的缩近语句块为循环体。

[python] view plaincopy

  1. ################################
  2. ######## procedure control #####
  3. ## while
  4. while expression:  
  5.     statement(s)  
  6. while True:  
  7. print 'hello'
  8.     x = raw_input('please input something, q for quit:')  
  9. if x == 'q':  
  10. break
  11. else:  
  12. print 'ending'

4、switch

         其实Python并没有提供switch结构,但我们可以通过字典和函数轻松的进行构造。例如:

[python] view plaincopy

  1. #############################
  2. ## switch ####
  3. ## this structure do not support by python
  4. ## but we can implement it by using dictionary and function
  5. ## cal.py ##
  6. #!/usr/local/python
  7. from __future__ import division  
  8. # if used this, 5/2=2.5, 6/2=3.0
  9. def add(x, y):  
  10. return x + y  
  11. def sub(x, y):  
  12. return x - y  
  13. def mul(x, y):  
  14. return x * y  
  15. def div(x, y):  
  16. return x / y  
  17. operator = {"+": add, "-": sub, "*": mul, "/": div}  
  18. operator["+"](1, 2) # the same as add(1, 2)
  19. operator["%"](1, 2) # error, not have key "%", but the below will not
  20. operator.get("+")(1, 2) # the same as add(1, 2)
  21. def cal(x, o, y):  
  22. print operator.get(o)(x, y)  
  23. cal(2, "+", 3)  
  24. # this method will effect than if-else

五、函数

1、自定义函数

         在Python中,使用def语句来创建函数:

[python] view plaincopy

  1. ################################
  2. ######## function ##### 
  3. def functionName(parameters): # no parameters is ok
  4.     bodyOfFunction  
  5. def add(a, b):  
  6. return a+b # if we do not use a return, any defined function will return default None 
  7. a = 100
  8. b = 200
  9. sum = add(a, b)  
  10. ##### function.py #####
  11. #!/usr/bin/python
  12. #coding:utf8  # support chinese
  13. def add(a = 1, b = 2): # default parameters
  14. return a+b  # can return any type of data
  15. # the followings are all ok
  16. add()  
  17. add(2)  
  18. add(y = 1)  
  19. add(3, 4)  
  20. ###### the global and local value #####
  21. ## global value: defined outside any function, and can be used
  22. ##              in anywhere, even in functions, this should be noted
  23. ## local value: defined inside a function, and can only be used
  24. ##              in its own function
  25. ## the local value will cover the global if they have the same name
  26. val = 100 # global value
  27. def fun():  
  28. print val # here will access the val = 100
  29. print val # here will access the val = 100, too
  30. def fun():  
  31.     a = 100 # local value
  32. print a  
  33. print a # here can not access the a = 100
  34. def fun():  
  35. global a = 100 # declare as a global value
  36. print a  
  37. print a # here can not access the a = 100, because fun() not be called yet
  38. fun()  
  39. print a # here can access the a = 100
  40. ############################
  41. ## other types of parameters
  42. def fun(x):  
  43. print x  
  44. # the follows are all ok
  45. fun(10) # int
  46. fun('hello') # string
  47. fun(('x', 2, 3))  # tuple
  48. fun([1, 2, 3])    # list
  49. fun({1: 1, 2: 2}) # dictionary
  50. ## tuple
  51. def fun(x, y):  
  52. print "%s : %s" % (x,y) # %s stands for string
  53. fun('Zou', 'xiaoyi')  
  54. tu = ('Zou', 'xiaoyi')  
  55. fun(*tu)    # can transfer tuple parameter like this
  56. ## dictionary
  57. def fun(name = "name", age = 0):  
  58. print "name: %s" % name  
  59. print "age: " % age  
  60. dic = {name: "xiaoyi", age: 25} # the keys of dictionary should be same as fun()
  61. fun(**dic) # can transfer dictionary parameter like this
  62. fun(age = 25, name = 'xiaoyi') # the result is the same
  63. ## the advantage of dictionary is can specify value name
  64. #############################
  65. ## redundancy parameters ####
  66. ## the tuple
  67. def fun(x, *args): # the extra parameters will stored in args as tuple type 
  68. print x  
  69. print args  
  70. # the follows are ok
  71. fun(10)  
  72. fun(10, 12, 24) # x = 10, args = (12, 24)
  73. ## the dictionary
  74. def fun(x, **args): # the extra parameters will stored in args as dictionary type 
  75. print x  
  76. print args  
  77. # the follows are ok
  78. fun(10)  
  79. fun(x = 10, y = 12, z = 15) # x = 10, args = {'y': 12, 'z': 15}
  80. # mix of tuple and dictionary
  81. def fun(x, *args, **kwargs):  
  82. print x  
  83. print args  
  84. print kwargs  
  85. fun(1, 2, 3, 4, y = 10, z = 12) # x = 1, args = (2, 3, 4), kwargs = {'y': 10, 'z': 12}

2、Lambda函数

         Lambda函数用来定义一个单行的函数,其便利在于:

[python] view plaincopy

  1. #############################
  2. ## lambda function ####
  3. ## define a fast single line function
  4. fun = lambda x,y : x*y # fun is a object of function class
  5. fun(2, 3)  
  6. # like
  7. def fun(x, y):  
  8. return x*y  
  9. ## recursion
  10. # 5=5*4*3*2*1, n!
  11. def recursion(n):  
  12. if n > 0:  
  13. return n * recursion(n-1) ## wrong
  14. def mul(x, y):  
  15. return x * y  
  16. numList = range(1, 5)  
  17. reduce(mul, numList) # 5! = 120
  18. reduce(lambda x,y : x*y, numList) # 5! = 120, the advantage of lambda function avoid defining a function
  19. ### list expression
  20. numList = [1, 2, 6, 7]  
  21. filter(lambda x : x % 2 == 0, numList)  
  22. print [x for x in numList if x % 2 == 0] # the same as above
  23. map(lambda x : x * 2 + 10, numList)  
  24. print [x * 2 + 10 for x in numList] # the same as above

3、Python内置函数

       Python内置了很多函数,他们都是一个个的.py文件,在python的安装目录可以找到。弄清它有那些函数,对我们的高效编程非常有用。这样就可以避免重复的劳动了。下面也只是列出一些常用的:

[python] view plaincopy

  1. ###################################
  2. ## built-in function of python ####
  3. ## if do not how to use, please use help()
  4. abs, max, min, len, divmod, pow, round, callable,  
  5. isinstance, cmp, range, xrange, type, id, int()  
  6. list(), tuple(), hex(), oct(), chr(), ord(), long()  
  7. callable # test a function whether can be called or not, if can, return true
  8. # or test a function is exit or not
  9. isinstance # test type
  10. numList = [1, 2]  
  11. if type(numList) == type([]):  
  12. print "It is a list"
  13. if isinstance(numList, list): # the same as above, return true
  14. print "It is a list"
  15. for i in range(1, 10001) # will create a 10000 list, and cost memory
  16. for i in xrange(1, 10001)# do not create such a list, no memory is cost
  17. ## some basic functions about string
  18. str = 'hello world'
  19. str.capitalize() # 'Hello World', first letter transfer to big
  20. str.replace("hello", "good") # 'good world'
  21. ip = "192.168.1.123"
  22. ip.split('.') # return ['192', '168', '1', '123']
  23. help(str.split)  
  24. import string  
  25. str = 'hello world'
  26. string.replace(str, "hello", "good") # 'good world'
  27. ## some basic functions about sequence
  28. len, max, min  
  29. # filter(function or none, sequence)
  30. def fun(x):  
  31. if x > 5:  
  32. return True
  33. numList = [1, 2, 6, 7]  
  34. filter(fun, numList) # get [6, 7], if fun return True, retain the element, otherwise delete it
  35. filter(lambda x : x % 2 == 0, numList)  
  36. # zip()
  37. name = ["me", "you"]  
  38. age = [25, 26]  
  39. tel = ["123", "234"]  
  40. zip(name, age, tel) # return a list: [('me', 25, '123'), ('you', 26, '234')]
  41. # map()
  42. map(None, name, age, tel) # also return a list: [('me', 25, '123'), ('you', 26, '234')]
  43. test = ["hello1", "hello2", "hello3"]  
  44. zip(name, age, tel, test) # return [('me', 25, '123', 'hello1'), ('you', 26, '234', 'hello2')]
  45. map(None, name, age, tel, test) # return [('me', 25, '123', 'hello1'), ('you', 26, '234', 'hello2'), (None, None, None, 'hello3')]
  46. a = [1, 3, 5]  
  47. b = [2, 4, 6]  
  48. def mul(x, y):  
  49. return x*y  
  50. map(mul, a, b) # return [2, 12, 30]
  51. # reduce()
  52. reduce(lambda x, y: x+y, [1, 2, 3, 4, 5]) # return ((((1+2)+3)+4)+5)
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2015年02月06日,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
NLP 服务
NLP 服务(Natural Language Process,NLP)深度整合了腾讯内部的 NLP 技术,提供多项智能文本处理和文本生成能力,包括词法分析、相似词召回、词相似度、句子相似度、文本润色、句子纠错、文本补全、句子生成等。满足各行业的文本智能需求。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档