parameters: (self, filename, line_offset,
                                   text, allow_unknown_category)
docstring: Parse a version section or entry file.
docstring_summary: Parse a version section or entry file.
docstring_tokens: Parse a version section or entry file .
function: def add_categories_from_text(self, filename, line_offset,
                                   text, allow_unknown_category):
          """Parse a version section or entry file."""
          try:
              categories = self.format.split_categories(text)
          except CategoryParseError as e:
              raise InputFormatError(filename, line_offset + e.line_offset,
                                     e.error_message)
          for category in categories:
              if not allow_unknown_category and \
                 category.name not in self.categories:
                  raise InputFormatError(filename,
                                         line_offset + category.title_line,
                                         'Unknown category: "{}"',
                                         category.name.decode('utf8'))
              self.categories[category.name] += category.body
function_tokens: def add_categories_from_text ( self , filename , line_offset , text , allow_unknown_category ) : try : categories = self . format . split_categories ( text ) except CategoryParseError as e : raise InputFormatError ( filename , line_offset + e . line_offset , e . error_message ) for category in categories : if not allow_unknown_category and category . name not in self . categories : raise InputFormatError ( filename , line_offset + category . title_line , 'Unknown category: "{}"' , category . name . decode ( 'utf8' ) ) self . categories [ category . name ] += category . body