arXiv / arxiv-classifier

Facebook contributed classifier for abstracts
14 stars 2 forks source link

Encapsulate and implement a public API for internal classifier service module #4

Closed erickpeirson closed 4 years ago

erickpeirson commented 5 years ago

The modules at services/ should be encapsulated within a module services/classifier/ that exposes a function:

classify(content: bytes) -> List[ClassifierPrediction]

Where ClassifierPrediction is the domain class from https://github.com/arXiv/arxiv-classifier/issues/3

Note that in order to generate the log-probability of the prediction, we may need to introduce a new method on this class that uses the predict_log_proba method of the underlying multinomial naive Bayes classifier