Everyman
25-10-2006, 01:42
L'esercizio e' in lingua inglese.
considerata la stringa s
s="""IBM rose 1.2% to $81.49
thanks to an upgrade to 'buy' from 'hold' from Citigroup,
but Cisco fell 0.2% to $100.02."""
con le regular expressions, come faccio a far apparire le due seguenti cose?
-words in quotes
-all words which are not numerical amounts
Io ho iniziato importando il seguente modulo:
from nltk_lite.utilities import re_show
Ma poi devo mettere l'effettiva regular expression iniziando ovviamente con:
re_show(' bla-bla :D ')
Qualcuno sa cosa devo mettere al posto del bla-bla :D ?
Vi prego, son disperato, ho provato di tutto, ma non so dove sbaglio :cry:
considerata la stringa s
s="""IBM rose 1.2% to $81.49
thanks to an upgrade to 'buy' from 'hold' from Citigroup,
but Cisco fell 0.2% to $100.02."""
con le regular expressions, come faccio a far apparire le due seguenti cose?
-words in quotes
-all words which are not numerical amounts
Io ho iniziato importando il seguente modulo:
from nltk_lite.utilities import re_show
Ma poi devo mettere l'effettiva regular expression iniziando ovviamente con:
re_show(' bla-bla :D ')
Qualcuno sa cosa devo mettere al posto del bla-bla :D ?
Vi prego, son disperato, ho provato di tutto, ma non so dove sbaglio :cry: