Import the function lemmatize_sentence() in side the function and then create the UDF that should work. you are getting this error because the import is on driver node not on the entire cluster. when you import this inside the function so in that case while creating the UDF it will send the copy of function to all the nodes in the cluster.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.