question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expand contractions before applying tense transformations? (v7)

See original GitHub issue

(Sorry if I’m reporting this as you’re working on it - perhaps I should wait until v7 is released)

These two examples illustrate the problem:

nlp("I'm going to the shops").sentences().toPastTense().out("text") // --> "I'm went to the shops"
nlp("I am going to the shops").sentences().toPastTense().out("text") // --> "I was going to the shops"

Perhaps expand tense-based contractions (e.g. with words “am”, “will”) before processing (or something like that)?

Edit: Another thing: nlp('london is calling').sentences().toNegative().out("text") throws: Uncaught TypeError: this.term.insertAfter is not a function - guess this is still being worked on?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
spencermountaincommented, May 24, 2017

hey, this works now too: 🎆

nlp('I am going to the shops').sentences().toPastTense().out()
// 'I went to the shops'

wee! v10.4.0

1reaction
spencermountaincommented, Mar 14, 2017

this one’s fine now though:

nlp('london is calling').sentences().toNegative().out()
Read more comments on GitHub >

github_iconTop Results From Across the Web

NLP - Expand contractions in Text Processing - GeeksforGeeks
Code 1: For expanding contractions using contractions library ... Removing contractions before forming word vectors helps in dimensionality ...
Read more >
SAMHSA TIP 35 Enhancing Motivation for Change in ...
Motivation relates to the probability that a person will enter into, continue, and adhere to a specific change strategy. Although much progress has...
Read more >
Contractions of English Semi-Modals: The Emancipating ...
2-3: Use of contracted semi-modals in the BNC (from Krug 2000:175) ... hand, got is the past tense form of get, and therefore...
Read more >
Effects of electrical stimulation on skin surface - PMC - NCBI
In vivo and in vitro experiments have also proven that it induces epithelialization and promotes wound contractions. Positive polarity will ...
Read more >
Exercises for Lumbar Instability - Physiopedia
Develop the skill of an independent contraction of the local muscle ... very slow and controlled weightbearing exercise to enhance the feedback mechanisms ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found