magistermilitum commited on
Commit
098aa7e
1 Parent(s): a276bc9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -1
README.md CHANGED
@@ -75,6 +75,7 @@ class TextProcessor:
75
  self.stripped_BIO_TAGS = []
76
 
77
  def read_file(self):
 
78
  with open(self.filename, 'r') as f:
79
  text = f.read()
80
  self.sentences = self.sent_detector.tokenize(text.strip())
@@ -157,7 +158,7 @@ class TextProcessor:
157
  output_file.write("TOKEN\tPERS\tLOCS\n"+"\n".join(["\t".join(x) for x in self.stripped_BIO_TAGS]))
158
 
159
  # Usage:
160
- processor = TextProcessor('sentence.txt')
161
  processor.read_file()
162
  processor.process_sentences()
163
  processor.apply_model(pipe)
 
75
  self.stripped_BIO_TAGS = []
76
 
77
  def read_file(self):
78
+ #Reading a txt file with one document per line.
79
  with open(self.filename, 'r') as f:
80
  text = f.read()
81
  self.sentences = self.sent_detector.tokenize(text.strip())
 
158
  output_file.write("TOKEN\tPERS\tLOCS\n"+"\n".join(["\t".join(x) for x in self.stripped_BIO_TAGS]))
159
 
160
  # Usage:
161
+ processor = TextProcessor('my_docs_file.txt')
162
  processor.read_file()
163
  processor.process_sentences()
164
  processor.apply_model(pipe)