playground.py 337 B

1234567891011121314
  1. import spacy
  2. from spacy import displacy
  3. nlp = spacy.load("en_core_web_trf")
  4. def test_something(text):
  5. doc = nlp(text)
  6. displacy.serve(doc, style="dep", port=5001)
  7. # test_something('Regex for redacted phone numbers with extra info for Baan-kaidee (TO BE REMOVED).')
  8. test_something('makes for mobile phones a diagonal number')