<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 lexsub
Step1:  Run the default solution on dev
Step2:  Evaluate the default output
<ASSISTANT_TASK:>
Python Code:
from default import *
import os
Explanation: lexsub: default program
End of explanation
lexsub = LexSub(os.path.join('data','glove.6B.100d.magnitude'))
output = []
with open(os.path.join('data','input','dev.txt')) as f:
    for line in f:
        fields = line.strip().split('\t')
        output.append(" ".join(lexsub.substitutes(int(fields[0].strip()), fields[1].strip().split())))
print("\n".join(output[:10]))
Explanation: Run the default solution on dev
End of explanation
from lexsub_check import precision
with open(os.path.join('data','reference','dev.out'), 'rt') as refh:
    ref_data = [str(x).strip() for x in refh.read().splitlines()]
print("Score={:.2f}".format(100*precision(ref_data, output)))
Explanation: Evaluate the default output
End of explanation
<END_TASK>