Skip to main content

A dataset utils repository. For tensorflow 2.x only!

Project description

datasets

A dataset utils repository. For tensorflow>=2.0.0b only!

Requirements

  • python 3.6
  • tensorflow>=2.0.0b

Installation

pip install nlp-datasets

Contents

Usage

For NMT task

from nlp_datasets import NMTSameFileDataset

o = NMTSameFileDataset(config=None, logger_name=None)
train_files = [] # your files
# train_dataset is an instance of tf.data.Dataset
train_dataset = o.build_train_dataset(train_files)
from nlp_datasets import NMTSeparateFileDataset

o = NMTSeparateFileDataset(config=None, logger_name=None)
feature_files = [] # your files
label_files = []
train_dataset = o.build_train_dataset(feature_files,label_files)

For DSSM task

from nlp_datasets import DSSMSameFileDataset

o = DSSMSameFileDataset(config=None, logger_name=None)
train_dataset = o.build_train_dataset(train_files=[])
from nlp_datasets import DSSMSeparateFileDataset

o = DSSMSeparateFileDataset(config=None, logger_name=None)
query_files = []
doc_files = []
label_files = []
train_dataset = o.build_train_dataset(query_files, doc_files, label_files)

For MatchPyramid task

from nlp_datasets import MatchPyramidSameFileDataset

o = MatchPyramidSameFileDataset(config=None, logger_name=None)
train_dataset = o.build_train_dataset(train_files=[])
from nlp_datasets import MatchPyramidSeparateFilesDataset

o = MatchPyramidSeparateFilesDataset(config=None, logger_name=None)
query_files = []
doc_files = []
label_files = []
train_dataset = o.build_train_dataset(query_files, doc_files, label_files)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for naivenmt-datasets, version 0.0.7
Filename, size File type Python version Upload date Hashes
Filename, size naivenmt_datasets-0.0.7-py3-none-any.whl (27.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size naivenmt_datasets-0.0.7.tar.gz (12.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page