imvladikon commited on
Commit
118bb1e
โ€ข
1 Parent(s): f502dba

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +5 -3
README.md CHANGED
@@ -24,9 +24,11 @@ example
24
  text = """
25
  ืฆืจืคืช ืžืžืฉื™ื›ื” ืœื‘ืขื•ืจ: ืœืื—ืจ ืืจื‘ืขื” ื™ืžื™ื ืฉืœ ืขื™ืžื•ืชื™ื ืืœื™ืžื™ื ื‘ื™ืŸ ืžืชืคืจืขื™ื ืœื›ื•ื—ื•ืช ื”ื‘ื™ื˜ื—ื•ืŸ ื‘ื›ืœ ืจื—ื‘ื™ ืฆืจืคืช, ื”ื™ื•ื (ืฉื‘ืช) ื”ืชืงื™ื™ืžื” ื”ืœื•ื•ื™ืชื• ืฉืœ ื”ื ืขืจ ื”ืืœื’'ื™ืจืื™, ื ืื”ืœ ื‘ืŸ ื”-17, ืฉื ื•ืจื” ืœืžื•ื•ืช ืขืœ ื™ื“ื™ ืฉื•ื˜ืจ ืœืื—ืจ ืฉื ื—ืฉื“ ื‘ื’ื ื™ื‘ืช ืจื›ื‘. ืœื‘ืงืฉืช ืžืฉืคื—ืชื•, ื”ื”ืœื•ื•ื™ื” ื”ืชืงื™ื™ืžื” ื›ืื™ืจื•ืข ืžืฆื•ืžืฆืžื ืฉื‘ื• ื”ืฉืชืชืคื• ื‘ื ื™ ืžืฉืคื—ื” ื•ื—ื‘ืจื™ื ื‘ืœื‘ื“. ืœืื—ืจ ืฉืืจื•ื ื• ืฉืœ ื ืื”ืœ ื”ื•ืฆื ืžื”ืžืกื’ื“ ื‘ืขื™ืจ ื ืื ื˜ืจ, ืืœืคื™ื ืงืจืื• "ืœืขืฉื™ื™ืช ืฆื“ืง ืขื‘ื•ืจื•".ื‘ืžืงื‘ื™ืœ, ื”ืžืฉื˜ืจื” ื”ืฆืจืคืชื™ืช ื ืขืจื›ืช ืœื”ืžืฉืš ื”ืžื”ื•ืžื•ืช ื‘ืขืฉืจื•ืช ืžื•ืงื“ื™ื ื‘ืจื—ื‘ื™ ื”ืžื“ื™ื ื”, ื›ืฉื‘ืžื”ืœืš ื”ืœื™ืœื” ื ืขืฆืจื• 1,300 ื‘ื ื™ ืื“ื. ืžืฉืจื“ ื”ืคื ื™ื ื”ืฆืจืคืชื™ ื”ื•ื“ื™ืข ื›ื™ ื‘ืžื”ืœืš ื”ืื™ืจื•ืขื™ื ื”ื•ืฆืชื• 1,350 ื›ืœื™ ืจื›ื‘, ื•-234 ื”ืฆืชื•ืช ืฉืœ ืžื‘ื ื™ื. ื›ืžื• ื›ืŸ, ืขืœ ืคื™ ื”ื ืชื•ื ื™ื ื ื’ืจื ื ื–ืง ืœ-200 ืžืจื›ื–ื™ ืงื ื™ื•ืช, 200 ืกื•ืคืจืžืจืงื˜ื™ื ื•-250 ืกื ื™ืคื™ ื‘ื ืง.
26
  """.strip()
27
- summarizer(text, max_length=50, num_beams=4,
28
- no_repeat_ngram_size=2,
29
- early_stopping=True)[0]["summary_text"]
 
 
30
  #ื ืขืจ ื”ืืœื’'ื™ืจืื™, ื‘ืŸ 17, ื ื•ืจื” ืœืžื•ื•ืช ืขืœ ื™ื“ื™ ืฉื•ื˜ืจ ืœืื—ืจ ืฉื ื—ืฉื“ ื‘ื’ื ื™ื‘ืช ืจื›ื‘. ื”ืœื•ื•ื™ืชื• ื”ืชืงื™ื™ืžื” ื›ืื™ืจื•ืข ืžืฆื•ืžืฆื ืฉื‘ื• ื”ืฉืชืชืคื• ื‘ื ื™ ืžืฉืคื—ื”
31
  ```
32
 
 
24
  text = """
25
  ืฆืจืคืช ืžืžืฉื™ื›ื” ืœื‘ืขื•ืจ: ืœืื—ืจ ืืจื‘ืขื” ื™ืžื™ื ืฉืœ ืขื™ืžื•ืชื™ื ืืœื™ืžื™ื ื‘ื™ืŸ ืžืชืคืจืขื™ื ืœื›ื•ื—ื•ืช ื”ื‘ื™ื˜ื—ื•ืŸ ื‘ื›ืœ ืจื—ื‘ื™ ืฆืจืคืช, ื”ื™ื•ื (ืฉื‘ืช) ื”ืชืงื™ื™ืžื” ื”ืœื•ื•ื™ืชื• ืฉืœ ื”ื ืขืจ ื”ืืœื’'ื™ืจืื™, ื ืื”ืœ ื‘ืŸ ื”-17, ืฉื ื•ืจื” ืœืžื•ื•ืช ืขืœ ื™ื“ื™ ืฉื•ื˜ืจ ืœืื—ืจ ืฉื ื—ืฉื“ ื‘ื’ื ื™ื‘ืช ืจื›ื‘. ืœื‘ืงืฉืช ืžืฉืคื—ืชื•, ื”ื”ืœื•ื•ื™ื” ื”ืชืงื™ื™ืžื” ื›ืื™ืจื•ืข ืžืฆื•ืžืฆืžื ืฉื‘ื• ื”ืฉืชืชืคื• ื‘ื ื™ ืžืฉืคื—ื” ื•ื—ื‘ืจื™ื ื‘ืœื‘ื“. ืœืื—ืจ ืฉืืจื•ื ื• ืฉืœ ื ืื”ืœ ื”ื•ืฆื ืžื”ืžืกื’ื“ ื‘ืขื™ืจ ื ืื ื˜ืจ, ืืœืคื™ื ืงืจืื• "ืœืขืฉื™ื™ืช ืฆื“ืง ืขื‘ื•ืจื•".ื‘ืžืงื‘ื™ืœ, ื”ืžืฉื˜ืจื” ื”ืฆืจืคืชื™ืช ื ืขืจื›ืช ืœื”ืžืฉืš ื”ืžื”ื•ืžื•ืช ื‘ืขืฉืจื•ืช ืžื•ืงื“ื™ื ื‘ืจื—ื‘ื™ ื”ืžื“ื™ื ื”, ื›ืฉื‘ืžื”ืœืš ื”ืœื™ืœื” ื ืขืฆืจื• 1,300 ื‘ื ื™ ืื“ื. ืžืฉืจื“ ื”ืคื ื™ื ื”ืฆืจืคืชื™ ื”ื•ื“ื™ืข ื›ื™ ื‘ืžื”ืœืš ื”ืื™ืจื•ืขื™ื ื”ื•ืฆืชื• 1,350 ื›ืœื™ ืจื›ื‘, ื•-234 ื”ืฆืชื•ืช ืฉืœ ืžื‘ื ื™ื. ื›ืžื• ื›ืŸ, ืขืœ ืคื™ ื”ื ืชื•ื ื™ื ื ื’ืจื ื ื–ืง ืœ-200 ืžืจื›ื–ื™ ืงื ื™ื•ืช, 200 ืกื•ืคืจืžืจืงื˜ื™ื ื•-250 ืกื ื™ืคื™ ื‘ื ืง.
26
  """.strip()
27
+ summarizer(text,
28
+ max_length=50,
29
+ num_beams=4,
30
+ no_repeat_ngram_size=2,
31
+ early_stopping=True)[0]["summary_text"]
32
  #ื ืขืจ ื”ืืœื’'ื™ืจืื™, ื‘ืŸ 17, ื ื•ืจื” ืœืžื•ื•ืช ืขืœ ื™ื“ื™ ืฉื•ื˜ืจ ืœืื—ืจ ืฉื ื—ืฉื“ ื‘ื’ื ื™ื‘ืช ืจื›ื‘. ื”ืœื•ื•ื™ืชื• ื”ืชืงื™ื™ืžื” ื›ืื™ืจื•ืข ืžืฆื•ืžืฆื ืฉื‘ื• ื”ืฉืชืชืคื• ื‘ื ื™ ืžืฉืคื—ื”
33
  ```
34