All Projects → dsindex → textsum_examples

dsindex / textsum_examples

Licence: other
[deprecated] reference code for textsum

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to textsum examples

About-tests-in-1C
Подборка материалов по тестированию в 1С:Предприятие 8
Stars: ✭ 27 (+58.82%)
Mutual labels:  tests
react-ecommerce
E-commerce monorepo application using NextJs, React, React-native, Design-System and Graphql with Typescript
Stars: ✭ 136 (+700%)
Mutual labels:  tests
Telegraf-Test
Telegraf Test - Simple Test ToolKit of Telegram Bots
Stars: ✭ 22 (+29.41%)
Mutual labels:  tests
react-typescript
React16 + HMR + typescript + webpack + tslint + tests
Stars: ✭ 21 (+23.53%)
Mutual labels:  tests
testing-framework
TYPO3 testing framework for core and extensions
Stars: ✭ 44 (+158.82%)
Mutual labels:  tests
unittest expander
A library that provides flexible and easy-to-use tools to parameterize Python unit tests, especially those based on unittest.TestCase.
Stars: ✭ 12 (-29.41%)
Mutual labels:  tests
coderbyte-challenges
ES 6/7 Javascript w/ Node - Coderbyte: tests-assert w/ working example
Stars: ✭ 1 (-94.12%)
Mutual labels:  tests
dojos
Alguns desafios para os participantes dos grupos de estudo
Stars: ✭ 33 (+94.12%)
Mutual labels:  tests
audio-analysis
The audio analysis code (AnalysisPrograms.exe) for the QUT Ecoacoustics Research Group
Stars: ✭ 41 (+141.18%)
Mutual labels:  tests
types-vs-tests
Tab vs spaces, vim vs emacs, types vs tests, our community is full of these conflicts. In this talk, we'll explore the latter: what is the impact of types in our programs? Can types help write more efficient tests? If so, how?
Stars: ✭ 17 (+0%)
Mutual labels:  tests
hubtel-payment
🎉A comprehensive PHP Client Package for consuming the Hubtel Payment API
Stars: ✭ 13 (-23.53%)
Mutual labels:  tests
ctest
A simple portable C test runner
Stars: ✭ 17 (+0%)
Mutual labels:  tests
regression-testing
Regression testing in Elm!
Stars: ✭ 22 (+29.41%)
Mutual labels:  tests
danger-swift-xcodesummary
A Danger-Swift plugin that adds build errors, warnings and unit tests results generated from xcodebuild to your Danger report
Stars: ✭ 72 (+323.53%)
Mutual labels:  tests
web-cve-tests
A simple framework for sending test payloads for known web CVEs.
Stars: ✭ 120 (+605.88%)
Mutual labels:  tests
playwright-test
Run unit tests with several runners or benchmark inside real browsers with playwright.
Stars: ✭ 81 (+376.47%)
Mutual labels:  tests
verification-tests
Blackbox test suite for OpenShift.
Stars: ✭ 41 (+141.18%)
Mutual labels:  tests
aqa-tests
Home of test infrastructure for Adoptium builds
Stars: ✭ 104 (+511.76%)
Mutual labels:  tests
atata-sample-app-tests
Automation tests application based on Atata Framework
Stars: ✭ 27 (+58.82%)
Mutual labels:  tests
atata-samples
Automation test samples based on Atata Framework
Stars: ✭ 39 (+129.41%)
Mutual labels:  tests

textsum

  # you need to install google protobuf(http://dchua.com/2016/04/08/installing-grpc,-protobuf-and-its-dependencies-for-python-development/)
  $ python check_data.py --data_path=data/data

  features {
    feature {
      key: "abstract"
      value {
        bytes_list {
          value: "<d> <p> <s> sri lanka closes schools as war escalates . </s> </p> </d>"
        }
      }
    }
    feature {
      key: "article"
      value {
        bytes_list {
          value: "<d> <p> <s> the sri lankan government on wednesday announced the closure of government schools with immediate effect as a military campaign against tamil separatists escalated in the north of the country . </s> <s> t
he cabinet wednesday decided to advance the december holidays by one month because of a threat from the liberation tigers of tamil eelam -lrb- ltte -rrb- against school children , a government official said . </s> <s> `` there are i
ntelligence reports that the tigers may try to kill a lot of children to provoke a backlash against tamils in colombo . </s> <s> `` if that happens , troops will have to be withdrawn from the north to maintain law and order here , \
'\' a police official said . </s> <s> he said education minister richard pathirana visited several government schools wednesday before the closure decision was taken . </s> <s> the government will make alternate arrangements to hold
 end of term examinations , officials said . </s> <s> earlier wednesday , president chandrika kumaratunga said the ltte may step up their attacks in the capital to seek revenge for the ongoing military offensive which she described
as the biggest ever drive to take the tiger town of jaffna . . </s> </p> </d>"
        }
      }
    }
    feature {
      key: "publisher"
      value {
        bytes_list {
          value: "AFP"
        }
      }
    }
  }
  ...
  • how to create own training data?
  $ python generate_data.py --input_dir=sample --data_path=sample-0
  $ python check_data.py --data_path=sample-0 --crc=4
  <class 'tensorflow.core.example.example_pb2.Example'>
  features {
    feature {
      key: "abstract"
      value {
        bytes_list {
          value: "<d> <p> <s> hello tensorflow </s> </p> </d>"
        }
      }
    }
    feature {
      key: "article"
      value {
        bytes_list {
          value: "<d> <p> <s> this is a sample file </s> </p> </d>"
        }
      }
    }
  }

  article   \t  <d> <p> <s> this is a sample file </s> </p> </d>
  abstract  \t  <d> <p> <s> hello tensorflow </s> </p> </d>
  ...
  • recent version of textsum provides data_convert_example.py
$ python data_convert_example.py --command binary_to_text --in_file data/data --out_file data/text_data
$ python data_convert_example.py --command text_to_binary --in_file data/text_data --out_file data/binary_data
$ python data_convert_example.py --command binary_to_text --in_file data/binary_data --out_file data/text_data2
$ diff data/text_data2 data/text_data

# your text_data format looks like 

abstract=hello world    article=this is a test file
abstract=...            article=....
...
  • test
$ ./test.sh -v -v
...
running_avg_loss: 1.002997
running_avg_loss: 1.384698
running_avg_loss: 0.865053
...
  • gpu setting tips
# if you want to prevent full gpu-memory allocation, set allow_growth option to 
# `seq2seq_attention.py`, `seq2seq_attention_decode.py`

device_config=tf.ConfigProto(allow_soft_placement=True)
device_config.gpu_options.allow_growth = True
sess = tf.Session(config=device_config)
...
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].