2

I am trying to implement cudf and just learned that using .apply is not supported with strings. I am currently trying to apply this function

def ngrams(tweet):
    test = [x for x in re.sub(r'[^\w\s]','', tweet).split() if not x in stopwords.words("english")]
    return list(everygrams(test, 1, 3))

to a series that just contains a bunch of tweets saved as strings. Is there a way around this or will I have to run everything on my CPU? Thank you!

talonmies
  • 70,661
  • 34
  • 192
  • 269
  • Support for strings in cuDF user defined functions is work in progress, but it will not include support for arbitrary functions. If you can create a [minimal, reproducible example](https://stackoverflow.com/help/minimal-reproducible-example), it may be possible to assist you with building a GPU accelerated version of your example. – Nick Becker Mar 15 '22 at 23:28

0 Answers0