title: AttributeError: 'spacy.tokens.span.Span' object has no attribute 'string'
body: <pre><code>import re
  import spacy
  from nltk.corpus import stopwords
  import pdfplumber
  
  def extract_All_data(path):
      text = &quot;&quot;
      try:
          with pdfplumber.open(path) as pdf:
              for i in pdf.pages:
                  text += i.extract_text()
              return text
      except:
          return None
  
  resume_text = extract_All_data(r&quot;E:\AllResumesPdfs\37202883_Mumbai_6.pdf&quot;)
  #resume_text =text.lower()
  
  # load pre-trained model
  nlp = spacy.load('en_core_web_lg')
  
  # Grad all general stop words
  STOPWORDS = set(stopwords.words('english'))
  
  # Education Degrees
  EDUCATION = [
              'BE','B.E.', 'B.E', 'BS', 'B.S',
              'ME', 'M.E', 'M.E.', 'MS', 'M.S', 'M.C.A.',
              'BTECH', 'B.TECH', 'M.TECH', 'MTECH',
              'SSC', 'HSC', 'CBSE', 'ICSE', 'X', 'XII'
          ]
  
  def extract_education(resume_text):
      nlp_text = nlp(resume_text)
  
      # Sentence Tokenizer
      nlp_text = [sent.string.strip() for sent in nlp_text.sents]
  
      edu = {}
      # Extract education degree
      for index, text in enumerate(nlp_text):
          for tex in text.split():
              # Replace all special symbols
              tex = re.sub(r'[?|$|.|!|,]', r'', tex)
              if tex.upper() in EDUCATION and tex not in STOPWORDS:
                  edu[tex] = text + nlp_text[index + 1]
  
      # Extract year
      education = []
      for key in edu.keys():
          year = re.search(re.compile(r'((20|19)(\d{2}))'), edu[key])
          if year:
              education.append((key, ''.join(year[0])))
          else:
              education.append(key)
      return education
  
  Education= extract_education(resume_text)
  print(Education)
  </code></pre>
  <p>I have download large model but still it showing error for string.
  please help me for solve this issue.
  Thanks in Advance.</p>
  <pre><code>C:\Python37\python.exe E:/JobScan/Sample1.py
  2021-05-22 09:33:10.781450: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
  2021-05-22 09:33:10.781933: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
  Traceback (most recent call last):
    File &quot;E:/JobScan/Sample1.py&quot;, line 58, in &lt;module&gt;
      Education= extract_education(resume_text)
    File &quot;E:/JobScan/Sample1.py&quot;, line 37, in extract_education
      nlp_text = [sent.string.strip() for sent in nlp_text.sents]
    File &quot;E:/JobScan/Sample1.py&quot;, line 37, in &lt;listcomp&gt;
      nlp_text = [sent.string.strip() for sent in nlp_text.sents]
  AttributeError: 'spacy.tokens.span.Span' object has no attribute 'string'
  
  Process finished with exit code 1
  </code></pre>
  <p>This is console error.</p>