OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Changing tense of text from present/future to past tense

  • Thread starter Thread starter Mandvi Shukla
  • Start date Start date
M

Mandvi Shukla

Guest
Please suggest the best approach to convert texts to past tense.

I tried using spacy with "en_core_web_sm" model which was not very efficient. Text - text = "The primary purpose of this Phase 3 study is to confirm the clinical benefits of poziotinib in a randomized study and to support the results from Phase 2 Study SPI-POZ-202 (ZENITH20) Cohort 2" Output - The primary purpose of this Phase 3 study is to confirmed the clinical benefits of poziotinib in a randomizeed study and to supported the results from Phase 2 Study SPI - POZ-202 ( ZENITH20 ) Cohort 2 .

i used pyinflect, and the output was:The primary purpose of thwas Phase 3 study was to confirm the clinical benefits of poziotinib in a randomized study and to support the results from Phase 2 Study SPI-POZ-202 (ZENITH20) Cohort 2.

it is converting this-thwas (considering present tense "is")

Tied using pattern.text.en, it seemed to give same results as the first one.
<p>Please suggest the best approach to convert texts to past tense.</p>
<p>I tried using <strong>spacy</strong> with "<strong>en_core_web_sm</strong>" model which was not very efficient.
Text - text = "The primary purpose of this Phase 3 study is to confirm the clinical benefits of poziotinib in a randomized study and to support the results from Phase 2 Study SPI-POZ-202 (ZENITH20) Cohort 2"
Output - The primary purpose of this Phase 3 study is to confirmed the clinical benefits of poziotinib in a
randomizeed study and to supported the results from Phase 2 Study SPI - POZ-202 ( ZENITH20 )
Cohort 2 .</p>
<p>i used <strong>pyinflect</strong>, and the output was:The primary purpose of thwas Phase 3 study was to confirm the clinical benefits of poziotinib in a randomized study and to support the results from Phase 2 Study SPI-POZ-202 (ZENITH20) Cohort 2.</p>
<p>it is converting this-thwas (considering present tense "is")</p>
<p>Tied using <strong>pattern.text.en</strong>, it seemed to give same results as the first one.</p>
 

Latest posts

I
Replies
0
Views
1
impact christian
I
Top