how to extract formula in their actual form from wikipedia to python

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



how to extract formula in their actual form from wikipedia to python



I have a python program where I am printing the Wikipedia summary.


def OnEnter(self, event):
input = self.txt.GetValue()
input = input.lower()
print wikipedia.summary(input)



I want to make the program to narrate the summary immediately after printing for the user. How can I do that?
As also how can I extract formula in their actual form from wikipedia to python





Can you share a pseudo code of what you would like to do?
– Abhishek Arya
Aug 10 at 5:57





My code let me ask any question, suppose "Who is edison", then the result comes in text form like "Thomas Alva Edison (February 11, 1847 – October 18, 1931) was an American inventor and businessman, who has been described as America's greatest inventor. He developed many devices that greatly influenced life around the world, including the phonograph, the motion picture camera, and the long-lasting, practical electric light bulb." from Wikipedia summery. I want this resulted text to be spoken. is there any way to do this?
– Tasnim Rushi
Aug 10 at 7:53





and also if I ask "what is ohms law" it answers "Ohm's law states that the current through a conductor between two points is directly proportional to the voltage across the two points. Introducing the constant of proportionality, the resistance, the relationship: I = V R , displaystyle I=frac VR,". see the formula is not is its regular shape. what should i do to turn it into its regular shape?
– Tasnim Rushi
Aug 10 at 8:00





1 Answer
1



For the first part you can use pyttsx as described in https://pythonprogramminglanguage.com/text-to-speech/ .



For the next part, as your formulas will be rendered in latex. So try to Google about how latex formula can be converted to text from in python. There are some answers regarding this. I don't know what you want exactly as the end result. So not quoting those here. Just Google and see.



Hope it helps.





thank you for your answer
– Tasnim Rushi
Aug 10 at 10:15






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard