shashank-gv / hugging

0 stars 0 forks source link

SUMMARISE: One sentence per line in the output #15

Closed gjwgit closed 2 years ago

gjwgit commented 2 years ago

It might be useful to have one sentence per line in the output like:

ml summarize hugging https://www.abc.net.au/news/2022-09-22/nasa-releases-clearest-view-of-neptunes-rings-in-decades/101466864
The new webb image also clearly shows Neptune's fainter dust bands. 
Some of the planet's rings have not been detected since 1989. 
Webb's images show the ice giant in a whole new light.

This way, I can pipe the output to another command and do further processing, sentence wise. E.g.,

ml summarize hugging https://www.abc.net.au/news/2022-09-22/nasa-releases-clearest-view-of-neptunes-rings-in-decades/101466864 | head -1 | ml sentiment hugging

I could then also output the sentiment of each sentence:

ml summarize hugging https://www.abc.net.au/news/2022-09-22/nasa-releases-clearest-view-of-neptunes-rings-in-decades/101466864 |  xargs -I@ bash -c 'ml sentiment hugging @'
shashank-gv commented 2 years ago

This should now be implemented.

gjwgit commented 2 years ago

Tested:

$ ml summarize hugging https://www.abc.net.au/news/2022-09-22/nasa-releases-clearest-view-of-neptunes-rings-in-decades/101466864
The new webb image also clearly shows Neptune's fainter dust bands.
Some of the planet's rings have not been detected since 1989.
Webb's images show the ice giant in a whole new light.
gjwgit commented 2 years ago

Tested:

$ ml summarize hugging https://www.abc.net.au/news/2022-09-22/nasa-releases-clearest-view-of-neptunes-rings-in-decades/101466864 | head -1
The new webb image also clearly shows Neptune's fainter dust bands.
gjwgit commented 2 years ago

This one not working due to sentiment command not yet fully functional

$ ml summarize hugging https://www.abc.net.au/news/2022-09-22/nasa-releases-clearest-view-of-neptunes-rings-in-decades/101466864 | head -1 | ml sentiment hugging
usage: sentiment.py [-h] text
sentiment.py: error: the following arguments are required: text