NTMC-Community / MatchZoo

Facilitating the design, comparison and sharing of deep text matching models.
Apache License 2.0
3.83k stars 899 forks source link

sample code problem in README.md #707

Closed yunhenk closed 5 years ago

yunhenk commented 5 years ago

Something is wrong with the sample code in README.md.

Pro 1

Line 112-113

valid_x, valid_y = valid_processed.unpack()
evaluate = mz.callbacks.EvaluateAllMetrics(model, x=valid_x, y=valid_y, batch_size=len(pred_x))

The variable 'pred_x' doesn't exist in previous code, this makes the total sample code unable to run.

Pro 2

nltk resource init

import nltk
nltk.download('stopwords')
nltk.download('punkt')

These code are also needed for the sample code to run.

uduse commented 5 years ago

The README is out-dated. Please see "tutorials/quick_start.ipynb" for a better reference.

@bwanglzu @faneshion I suggest removing the code in the README completely and replace it with our tutorial reference.

yunhenk commented 5 years ago

Got it, tutorial reference is better.

bwanglzu commented 5 years ago

Ill take over

bwanglzu commented 5 years ago

@uduse I personally perfer quick start in readme to give user an impression on how it works.

uduse commented 5 years ago

@bwanglzu README shouldn't be too long, but I agree that a ~15 line minimum working code would be nice.