Text Summarizer
1.0.0

比較文本摘要生成的藝術模型狀態
克隆倉庫
pip3 install -r requirements.txt
python -m spacy download en_core_web_md from NLTK_summarizer import SummarizerNLTK
print ( SummarizerNLTK (). summary ( text = "" )) from BERT_summarizer import SummarizerBERT
print ( SummarizerBERT (). summary ( text = "" )) from T5_BART_summarizer import SummarizerT5BART
print ( SummarizerT5BART (). summary ( text = "" ))查看文件中的文檔以更好地理解
取自Kaggle數據集:https://www.kaggle.com/snapcrack/all-the-news
WASHINGTON — Congressional Republicans have a new fear when it comes to their health care lawsuit against the Obama administration: They might win. The incoming Trump administration could choose to no longer defend the executive branch against the suit, which challenges the administration’s authority to spend billions of dollars on health insurance subsidies for and Americans, handing House Republicans a big victory on issues. But a sudden loss of the disputed subsidies could conceivably cause the health care program to implode, leaving millions of people without access to health insurance before Republicans have prepared a replacement. That could lead to chaos in the insurance market and spur a political backlash just as Republicans gain full control of the government. To stave off that outcome, Republicans could find themselves in the awkward position of appropriating huge sums to temporarily prop up the Obama health care law, angering conservative voters who have been demanding an end to the law for years. In another twist, Donald J. Trump’s administration, worried about preserving executive branch prerogatives, could choose to fight its Republican allies in the House on some central questions in the dispute. Eager to avoid an ugly political pileup, Republicans on Capitol Hill and the Trump transition team are gaming out how to handle the lawsuit, which, after the election, has been put in limbo until at least late February by the United States Court of Appeals for the District of Columbia Circuit. They are not yet ready to divulge their strategy. “Given that this pending litigation involves the Obama administration and Congress, it would be inappropriate to comment,” said Phillip J. Blando, a spokesman for the Trump transition effort. “Upon taking office, the Trump administration will evaluate this case and all related aspects of the Affordable Care Act. ” In a potentially decision in 2015, Judge Rosemary M. Collyer ruled that House Republicans had the standing to sue the executive branch over a spending dispute and that the Obama administration had been distributing the health insurance subsidies, in violation of the Constitution, without approval from Congress. The Justice Department, confident that Judge Collyer’s decision would be reversed, quickly appealed, and the subsidies have remained in place during the appeal. In successfully seeking a temporary halt in the proceedings after Mr. Trump won, House Republicans last month told the court that they “and the ’s transition team currently are discussing potential options for resolution of this matter, to take effect after the ’s inauguration on Jan. 20, 2017. ” The suspension of the case, House lawyers said, will “provide the and his future administration time to consider whether to continue prosecuting or to otherwise resolve this appeal. ” Republican leadership officials in the House acknowledge the possibility of “cascading effects” if the payments, which have totaled an estimated $13 billion, are suddenly stopped. Insurers that receive the subsidies in exchange for paying costs such as deductibles and for eligible consumers could race to drop coverage since they would be losing money. Over all, the loss of the subsidies could destabilize the entire program and cause a lack of confidence that leads other insurers to seek a quick exit as well. Anticipating that the Trump administration might not be inclined to mount a vigorous fight against the House Republicans given the ’s dim view of the health care law, a team of lawyers this month sought to intervene in the case on behalf of two participants in the health care program. In their request, the lawyers predicted that a deal between House Republicans and the new administration to dismiss or settle the case “will produce devastating consequences for the individuals who receive these reductions, as well as for the nation’s health insurance and health care systems generally. ” No matter what happens, House Republicans say, they want to prevail on two overarching concepts: the congressional power of the purse, and the right of Congress to sue the executive branch if it violates the Constitution regarding that spending power. House Republicans contend that Congress never appropriated the money for the subsidies, as required by the Constitution. In the suit, which was initially championed by John A. Boehner, the House speaker at the time, and later in House committee reports, Republicans asserted that the administration, desperate for the funding, had required the Treasury Department to provide it despite widespread internal skepticism that the spending was proper. The White House said that the spending was a permanent part of the law passed in 2010, and that no annual appropriation was required — even though the administration initially sought one. Just as important to House Republicans, Judge Collyer found that Congress had the standing to sue the White House on this issue — a ruling that many legal experts said was flawed — and they want that precedent to be set to restore congressional leverage over the executive branch. But on spending power and standing, the Trump administration may come under pressure from advocates of presidential authority to fight the House no matter their shared views on health care, since those precedents could have broad repercussions. It is a complicated set of dynamics illustrating how a quick legal victory for the House in the Trump era might come with costs that Republicans never anticipated when they took on the Obama White House.
| # | 模型 | 花費時間(下載) | 完全的 | 概括 | 花費時間(無下載) |
|---|---|---|---|---|---|
| 1 | NLTK語料庫 | 0 | 真的 | 即將上任的特朗普政府可以選擇... | 0 |
| 2 | Bert-Base基於Kmeans | 27 | 真的 | 即將上任的特朗普政府可以選擇... | 15 |
| 3 | Bert-Base-uncund gmm | 3 | 真的 | 即將上任的特朗普政府可以選擇... | 4 |
| 4 | Bert-large基於Kmeans | 29 | 真的 | 即將上任的特朗普政府可以選擇... | 8 |
| 5 | Bert-large基於GMM | 9 | 真的 | 司法部有信心C法官... | 9 |
| 6 | XLNET基準的Kmeans | 11 | 真的 | 但是,有爭議的補貼的突然損失有限... | 3 |
| 7 | XLNET基準的GMM | 3 | 真的 | 但是,有爭議的補貼的突然損失有限... | 3 |
| 8 | XLM-MLM-ENFR-1024 KMeans | 20 | 真的 | 華盛頓 - 國會共和黨人有... | 4 |
| 9 | XLM-MLM-ENFR-1024 GMM | 25 | 真的 | 但是,有爭議的補貼的突然損失有限... | 5 |
| 10 | Distilbert-base基於kmeans | 6 | 真的 | 但是,有爭議的補貼的突然損失有限... | 2 |
| 11 | Distilbert-Base基於gmm | 2 | 真的 | 但是,有爭議的補貼的突然損失有限... | 2 |
| 12 | Albert-Base-V1 Kmeans | 3 | 真的 | 為了避免這種結果,共和黨人可以... | 2 |
| 13 | Albert-Base-V1 GMM | 2 | 真的 | 但是,有爭議的補貼的突然損失有限... | 2 |
| 14 | Albert-Large-V1 Kmeans | 4 | 真的 | 即將上任的特朗普政府可以選擇... | 2 |
| 15 | Albert-Large-V1 GMM | 3 | 真的 | 但是,有爭議的補貼的突然損失有限... | 3 |
| 16 | Facebook/Bart-large-CNN | 36 | 錯誤的 | 錯誤 | 56 |
| 17 | T5-11b | 4 | 錯誤的 | 錯誤 | 2 |
| 18 | T5-3B | 跳過 | 錯誤的 | 錯誤 | 跳過 |
| 19 | t5鹼基 | 30 | 真的 | 突然的損失 | 38 |
| 20 | t5大 | 跳過 | 錯誤的 | 錯誤 | 跳過 |
| 21 | T5-small | 9 | 真的 | 即將到來的政府可以 | 11 |
如果要比較輸出,請轉到results文件夾
一直以秒為單位
跳過意味著即使經過多次嘗試,它也會失敗
錯誤意味著該過程未完成
該代碼是在Google Colab(GPU運行時)上運行的,該代碼具有相當不錯的硬件。
另外可能需要一些時間下載大型預訓練模型
大多數時候,NLTK工作速度更快,更好。
下一個最好的是伯特,但是令牌化發生在伯特中,有時會在失去所有含義之間留下句子。它在很大的文本中效果很好。
T5試圖找出新句子,但即使使用體面的硬件也幾乎不可能運行。對於T5,您可以選擇模型的大小。即使在GPU或TPU上,T5基數上方的所有內容都非常慢。
Facebook Bart確實很快做了太多的計算機,並且耗盡了內存。
在完整數據集上運行
發布PYPI的包裝紙
比較GPU的效率
添加Facebook的Bart
添加Google T5
加大伯特
你可以給我一個小嗎?多普曼?通過主演該項目的支持
Kuldeep Singh Sidhu
GitHub:Github/Singhsidhukuldeep https://github.com/singhsidhukuldeep
網站:Kuldeep Singh Sidhu(網站) http://kuldeepsinghsidhu.com
LinkedIn:Kuldeep Singh Sidhu(LinkedIn) https://www.linkedin.com/in/singhsidhukuldeep/