T5 Bill of Rights Sample
The following sample, taken from the Bill of Rights, is more difficult because it expressed the precise rights of a person.
Open Summarizing_Text_V2.ipynb
, a copy of the Summarizing_Text_with_T5.ipynb
notebook we used in Chapter 7, Applying Transformers to Legal and Financial Documents for AI Text Summarization.
We will first run T5 without making any changes.
Summarizing the Bill of Rights, version 1
In this section, we will enter the same text we did in Chapter 7, Applying Transformers to Legal and Financial Documents for AI Text Summarization:
#Bill of Rights,V
text ="""
No person shall be held to answer for a capital, or otherwise infamous crime, unless on a presentment or indictment of a Grand Jury, exceptin cases arising in the land or naval forces, or in the Militia, when in actual service in time of War or public danger; nor shall any person be subject for the same offense to be twice put in jeopardy of life or limb...