class_docstr: Determines the number of words in quotes in a string.
  
  Description:
      Given a list of strings, determine the number of words in quotes
      in each string.
  
      This implementation handles Unicode characters.
  
      If a string is missing, return `NaN`.
  
  Args:
      quote_type (str, optional): Specifies what type of quotation marks to match.
      Argument "single" matches on only single quotes (' ').
      Argument "double" matches words between double quotes (" ").
      Argument "both" matches words between either type of quotes.
      Defaults to "both".
  
  Examples:
       >>> x = ['"python" java prolog "Diffie-Hellman" "4.99"', "Reach me at 'user@email.com'", "'Here's an interesting example!'"]
      >>> number_of_words_in_quotes = NumberOfWordsInQuotes()
      >>> number_of_words_in_quotes(x).tolist()
      [3, 1, 4]
class_docstr_tok: ["Determines","the","number","of","words","in","quotes","in","a","string",".","Description",":","Given","a","list","of","strings",",","determine","the","number","of","words","in","quotes","in","each","string",".","This","implementation","handles","Unicode","characters",".","If","a","string","is","missing",",","return","`","NaN","`",".","Args",":","quote_type","(","str",",","optional",")",":","Specifies","what","type","of","quotation","marks","to","match",".","Argument","``","single","''","matches","on","only","single","quotes","(","'","'",")",".","Argument","``","double","''","matches","words","between","double","quotes","(","``","``",")",".","Argument","``","both","''","matches","words","between","either","type","of","quotes",".","Defaults","to","``","both","''",".","Examples",":",">",">",">","x","=","[","'","''","python","''","java","prolog","``","Diffie-Hellman","''","``","4.99","''","'",",","``","Reach","me","at","'user","@","email.com","'","''",",","``","'Here","'s","an","interesting","example","!","'","''","]",">",">",">","number_of_words_in_quotes","=","NumberOfWordsInQuotes","(",")",">",">",">","number_of_words_in_quotes","(","x",")",".tolist","(",")","[","3",",","1",",","4","]"]
code: def __init__(self, quote_type="both"):
      if quote_type not in ["both", "single", "double"]:
          raise ValueError(
              f"{quote_type} is not a valid quote_type. Specify 'both', 'single', or 'double'",
          )
      self.quote_type = quote_type
      IN_DOUBLE_QUOTES = r'((^|\W)"(.)*?"(?!\w))'
      IN_SINGLE_QUOTES = r"((^|\W)'(.)*?'(?!\w))"
      if quote_type == "double":
          self.regex = IN_DOUBLE_QUOTES
      elif quote_type == "single":
          self.regex = IN_SINGLE_QUOTES
      else:
          self.regex = f"({IN_SINGLE_QUOTES}|{IN_DOUBLE_QUOTES})"
  
file_path: featuretools/featuretools/primitives/standard/transform/natural_language/number_of_words_in_quotes.py
imports: import re
  from string import punctuation
  import pandas
  from woodwork.column_schema import ColumnSchema
  from woodwork.logical_types import IntegerNullable, NaturalLanguage
  from featuretools.primitives.base import TransformPrimitive
  from featuretools.primitives.standard.transform.natural_language.constants import DELIMITERS
label_desc: Use image node_id 1 to create a new NumberOfWordsInQuotes object from inherited base classes: TransformPrimitive with example: obj = NumberOfWordsInQuotes(quote_type)