Determine sentence type: Difference between revisions
m
→{{header|Python}}: Reinterpreted N tag as 'not puncuated'
m (→{{header|Python}}: Reinterpreted N tag as 'not puncuated') |
|||
Line 355:
def go(sentences):
return [
(tagDict.get(k, '
for (k, v) in groupby(
sorted(sentences, key=last),
Line 393:
# main :: IO ()
def main():
'''
tags = {'!': 'E', '?': 'Q', '.': 'S'}
Line 405:
"Feels as light as polystyrene filler.",
"But perhaps substance isn't the goal!",
"Just make sure you don't break
])
Line 459:
('S', ["I'd like to present to you the washing machine 9001.", 'Feels as light as polystyrene filler.'])
('Q', ['Hi there, how are you today?', 'Might it be possible to add some challenge to this task?'])
('
=={{header|Raku}}==
|