I need a code in python to search and replace words and filter phrases from a txt file based on its words.
There is a large file [login to view URL] with text like this:
Life is a characteristic that distinguishes physical entities that have biological process. Various forms of life exist, such as archaea, and bacteria. Biology is the science that studies life.
In this case we have 3 phrases in one paragraph:
1) Life is a characteristic that distinguishes physical entities that have biological process.
2) Various forms of life exist, such as archaea, and bacteria.
3) Biology is the science that studies life.
It means, a phrase is a group of words that ends with . ? or !
------------
We need 3 functions called f1, f2 and f3.
Function 1 (f1): search and replace
This function is basically to search and replace words. There is a file called [login to view URL] with words like this:
He's=He is
Yo=You
The code must find the word "He's" and replace with "He is" and so on for the other words.
It is case sensitive.
Search only for the entire word, for example, don't replace the word "Young" by "Youung".
The command line must be:
C:/user/.../python310: python [login to view URL] [login to view URL] [login to view URL] f1
Change and save the file [login to view URL] with the replacements.
Function 2 (f2) filter phrases
There is a file [login to view URL] with many words, like:
You
Me
To
Are
How
Day
And
This
Is
The code will filter only the phrases that all its words are in the [login to view URL] file. In this example the phrase "How are you?" achieved the criteria and "how are you doing?" do not, because the word doing is not listed.
The command line must be C:/user/.../python310: python [login to view URL] [login to view URL] [login to view URL] f2.
It creates the file [login to view URL]
This file must contain the list of phrases that achieved the criteria and with no repetition (don't list the same phrase twice).
Function 3 (f3): filter phrases
There is a file [login to view URL] with some words, like:
You
Do
Day
The code must filter the phrases that have at least one word from words_2.txt.
The phrase "did you know?" is ok, because the word "you" is in the file words_2.txt.
The phrase "this is me." is not ok, no one word is in the file [login to view URL]
The command line must be:
C:/user/.../python310: python [login to view URL] [login to view URL] [login to view URL] f3
It must create the file [login to view URL] with the phrases filtered.
Don't list the same phrase twice.
Greetings Lucas!
I have excellent skills regarding your project with over six years of experience. I'll developed a robust version which will work like a champ with huge text file. I'll use advance Regex. Acknowledge me back to discuss further and start work on your project right away.
Waiting for your response!
Thank you
$20 USD em 7 dias
5,0 (8 avaliações)
3,4
3,4
13 freelancers estão ofertando em média $32 USD for esse trabalho
Hello.
As a senior full stack software engineer, I have rich experience with Python.
I can solve you problem in a day.
Please contact me.
I am ready to start right now.
Hello, I read the description and I can do it. The price has to be adjusted as it is quite a bit of work, but you will get it delivered by today.
I am a Computer Science Bachelor, currently enrolled in the Masters program, from one of the most reputable Universities in Germany. I have over 8 years of programming experience in Python and over 4 years of Data Science background. If you have any further questions about myself, I would be happy to answer them.
Hi, I've read your description carefully.
I have full experience with python
I've also worked on several similar projects.
So I can complete your project with high quality on time.
Looking forward to hear more about the project from you via chatting.
Thanks & Best regards!
Hi there,
I have gone through the complete description of your requirement. I am having 3+ years of experience in python, machine learning, and chatbot development. i can help you to rephrase function as per the description given. kindly share the all the text files so that i can start working on the task asap.
please open a chat to have a detail discussion and take things forward.
thanks,
Nadeem
Greeting
I understand your problem statement clearly and I can a sure you that we will be able to do this task with in time limit of 2 days . I have tons of experience doing similar NLP problem solving if you want I do this task in both ways using AI and with out using it .
Hello,
I am Aymen. A technical consultant and an ICT engineer. I have developed several Business level application in my job and tried
several things in my free time.
I enjoy making AI based applications. In fact I haveused NLP and data manupilation in python for many projects. I am confident that I can deliver the work requested very quickly.
To do that, let's talk to start working as soon as possible.
Thanks and see you soon.