Skip to content
Permalink
Browse files

Remove document classification code that's been moved to hedwig (#186;

…close #185)

* Remove document classification datasets

* Remove ReutersEvaluator

* Remove ReutersTrainer

* Remove document classification models

* Remove document classification from README.md
  • Loading branch information...
achyudh authored and daemon committed Apr 8, 2019
1 parent 430fd79 commit fa2f59535c71a0fb4586afbe543b81ba812c8630
@@ -1,19 +1,12 @@
# Castor

This is the common repo for PyTorch deep learning models by the Data Systems Group at the University of Waterloo.
This is the common repo for deep learning models implemented in PyTorch by the Data Systems Group at the University of Waterloo.

## Models

### Predictions Over One Input Text Sequence

For sentiment analysis, topic classification, etc.

+ [Kim CNN](./kim_cnn/): Baseline convolutional neural network for sentence classification [(Kim, EMNLP 2014)](http://www.aclweb.org/anthology/D14-1181)
+ [Conv-RNN](./conv_rnn/): Convolutional RNN [(Wang et al., KDD 2017)](https://dl.acm.org/citation.cfm?id=3098140)
+ [HAN](./han/): Hierarchical Attention Networks [(Zichao, et al, NAACL 2016)](https://www.cs.cmu.edu/~hovy/papers/16HLT-hierarchical-attention-networks.pdf)
+ [LSTM-Reg](./lstm_regularization/): Standard LSTM with Regularization [(Merity et al.)](https://arxiv.org/abs/1708.02182)
+ [XML-CNN](./xml_cnn/): CNNs for Extreme Multi-label Text Classification [(Liu et al., SIGIR 2017)](http://nyc.lti.cs.cmu.edu/yiming/Publications/jliu-sigir17.pdf)
+ [Char-CNN](.//): Character-level Convolutional Network [(Zhang et al., NIPS 2015)](http://papers.nips.cc/paper/5782-character-level-convolutional-networks-for-text-classification.pdf)
Moved to https://github.com/castorini/hedwig

### Predictions Over Two Input Text Sequences

This file was deleted.

Oops, something went wrong.
No changes.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
@@ -11,9 +11,6 @@
from datasets.snli import SNLI
from datasets.sts2014 import STS2014
from datasets.quora import Quora
from datasets.reuters import Reuters
from datasets.aapd import AAPD
from datasets.imdb import IMDB


class UnknownWordVecCache(object):
@@ -87,21 +84,6 @@ def get_dataset(dataset_name, word_vectors_dir, word_vectors_file, batch_size, d
train_loader, dev_loader, test_loader = Quora.iters(dataset_root, word_vectors_file, word_vectors_dir, batch_size, device=device, unk_init=UnknownWordVecCache.unk)
embedding = nn.Embedding.from_pretrained(Quora.TEXT_FIELD.vocab.vectors)
return Quora, embedding, train_loader, test_loader, dev_loader
elif dataset_name == 'reuters':
dataset_root = os.path.join(castor_dir, os.pardir, 'Castor-data', 'datasets', 'Reuters-21578/')
train_loader, dev_loader, test_loader = Reuters.iters(dataset_root, word_vectors_file, word_vectors_dir, batch_size, device=device, unk_init=UnknownWordVecCache.unk)
embedding = nn.Embedding.from_pretrained(Reuters.TEXT_FIELD.vocab.vectors)
return Reuters, embedding, train_loader, test_loader, dev_loader
elif dataset_name == 'aapd':
dataset_root = os.path.join(castor_dir, os.pardir, 'Castor-data', 'datasets', 'AAPD/')
train_loader, dev_loader, test_loader = AAPD.iters(dataset_root, word_vectors_file, word_vectors_dir, batch_size, device=device, unk_init=UnknownWordVecCache.unk)
embedding = nn.Embedding.from_pretrained(AAPD.TEXT_FIELD.vocab.vectors)
return AAPD, embedding, train_loader, test_loader, dev_loader
elif dataset_name == 'imdb':
dataset_root = os.path.join(castor_dir, os.pardir, 'Castor-data', 'datasets', 'IMDB/')
train_loader, dev_loader, test_loader = AAPD.iters(dataset_root, word_vectors_file, word_vectors_dir, batch_size, device=device, unk_init=UnknownWordVecCache.unk)
embedding = nn.Embedding.from_pretrained(AAPD.TEXT_FIELD.vocab.vectors)
return IMDB, embedding, train_loader, test_loader, dev_loader
else:
raise ValueError('{} is not a valid dataset.'.format(dataset_name))

@@ -4,7 +4,6 @@
from .evaluators.trecqa_evaluator import TRECQAEvaluator
from .evaluators.wikiqa_evaluator import WikiQAEvaluator
from .evaluators.pit2015_evaluator import PIT2015Evaluator
from .evaluators.reuters_evaluator import ReutersEvaluator
from .evaluators.snli_evaluator import SNLIEvaluator
from .evaluators.sts2014_evaluator import STS2014Evaluator
from .evaluators.quora_evaluator import QuoraEvaluator
@@ -25,10 +24,6 @@ class EvaluatorFactory(object):
'wikiqa': WikiQAEvaluator,
'pit2015': PIT2015Evaluator,
'twitterurl': PIT2015Evaluator,
'Reuters': ReutersEvaluator,
'AAPD': ReutersEvaluator,
'IMDB': ReutersEvaluator,
'Yelp2014': ReutersEvaluator,
'SNLI': SNLIEvaluator,
'sts2014': STS2014Evaluator,
'Quora': QuoraEvaluator
Oops, something went wrong.

0 comments on commit fa2f595

Please sign in to comment.
You can’t perform that action at this time.