naf2conll/naf2conll/conll_writers.py
def add_missing_data_to_sentence(self, sentence):
        """
        Make sure all columns are present in all words of the sentence.

        Changes the sentence in place!
        Complains according to self.on_missing if data is missing.
        """
        for column in self.columns:
            on_missing = self.on_missing[column]
            if on_missing == 'nothing':
                default = self.defaults[column]
                for word in sentence:
                    if word.get(column, None) is None:
                        word[column] = default
            elif on_missing == 'warn':
                default = self.defaults[column]
                for word in sentence:
                    if word.get(column, None) is None:
                        word[column] = default
                        logger.warn(self.get_missing_message(column, word))
            elif on_missing == 'throw':
                for word in sentence:
                    if word.get(column, None) is None:
                        raise ValueError(
                            self.get_missing_message(column, word)
                        )
            else:
                raise ValueError(
                    f"`on_missing` should be either 'nothing', 'warn' or"
                    f" 'throw', but `on_missing[{column!r}]` is {on_missing!r}"
                )

        Make sure all columns are present in all words of the sentence.

        Changes the sentence in place!
        Complains according to self.on_missing if data is missing.
        
Make sure all columns are present in all words of the sentence.
Changes the sentence in place.
Complains according to self.on_missing if data is missing.
Make sure all columns are present in all words of the sentence . Changes the sentence in place . Complains according to self . on_missing if data is missing .
def add_missing_data_to_sentence(self, sentence):
        for column in self.columns:
            on_missing = self.on_missing[column]
            if on_missing == 'nothing':
                default = self.defaults[column]
                for word in sentence:
                    if word.get(column, None) is None:
                        word[column] = default
            elif on_missing == 'warn':
                default = self.defaults[column]
                for word in sentence:
                    if word.get(column, None) is None:
                        word[column] = default
                        logger.warn(self.get_missing_message(column, word))
            elif on_missing == 'throw':
                for word in sentence:
                    if word.get(column, None) is None:
                        raise ValueError(
                            self.get_missing_message(column, word)
                        )
            else:
                raise ValueError(
                    f"`on_missing` should be either 'nothing', 'warn' or"
                    f" 'throw', but `on_missing[{column!r}]` is {on_missing!r}"
                )
def add_missing_data_to_sentence ( self , sentence ) : for column in self . columns : on_missing = self . on_missing [ column ] if on_missing == 'nothing' : default = self . defaults [ column ] for word in sentence : if word . get ( column , None ) is None : word [ column ] = default elif on_missing == 'warn' : default = self . defaults [ column ] for word in sentence : if word . get ( column , None ) is None : word [ column ] = default logger . warn ( self . get_missing_message ( column , word ) ) elif on_missing == 'throw' : for word in sentence : if word . get ( column , None ) is None : raise ValueError ( self . get_missing_message ( column , word ) ) else : raise ValueError ( f"`on_missing` should be either 'nothing', 'warn' or" f" 'throw', but `on_missing[{column!r}]` is {on_missing!r}" )
Make sure all columns are present in all words of the sentence.
Make sure all columns are present in all words of the sentence .
"""
        Make sure all columns are present in all words of the sentence.

        Changes the sentence in place!
        Complains according to self.on_missing if data is missing.
        """
self
sentence