def missing_tags(self, outputfile, annotation_graph, additional_map_path):
        """ Method to check if all the poses and glosses are mapped in the external mapping provided.
            Any non-mapped gloss and/or pos tags are stored for outputting the JSON file.
            If no missing tags are found, the objects in the output file will be empty.
            If no tag mapping is passed (e.g. running the converter without the -t flag) then the result will
            contain all the tags.
        """

        #load the nodes to be validated
        pos_nodes = []
        for marker in annotation_graph.tier_mapper.tier_labels(poioapi.data.TIER_POS):
            pos_nodes.extend(annotation_graph.nodes_for_tier(marker))

        gloss_nodes = []
        for marker in annotation_graph.tier_mapper.tier_labels(poioapi.data.TIER_GLOSS):
            gloss_nodes.extend(annotation_graph.nodes_for_tier(marker))

        if self._annotation_mapper is None:
            self._annotation_mapper = \
                poioapi.mapper.AnnotationMapper(annotation_graph.source_type, poioapi.data.TYPECRAFT)

        # load the additional mappings if any
        self._annotation_mapper.load_mappings(additional_map_path)

        # done loading, now validate the tags
        # pos
        for node in pos_nodes:
            annotation = annotation_graph.annotation_value_for_node(node)

            if not any((c in annotation) for c in "()/\.-?*"):
                mapping = self._annotation_mapper.validate_tag(poioapi.data.TIER_POS, annotation)
                if mapping is None:
                    self._annotation_mapper.add_to_missing(poioapi.data.TIER_POS, annotation)

        #gloss
        for node in gloss_nodes:
            annotation = annotation_graph.annotation_value_for_node(node)

            splitter = '.'
            # Special gloss value
            if "?" in annotation and annotation != "?IPFV":
                continue

            # Select the splitter for the gloss values
            if ":" in annotation:
                splitter = ":"

            for token in annotation.split(splitter):
                gloss_list = self._annotation_mapper.validate_tag(poioapi.data.TIER_GLOSS, token.strip('-'))

                if gloss_list is None and (token.isupper() or token.strip('-').isdigit()):
                    self._annotation_mapper.add_to_missing(poioapi.data.TIER_GLOSS, token.strip('-'))

        self._annotation_mapper.export_missing_tags(outputfile)
dataset/ETHPy150Open cidles/poio-api/src/poioapi/io/typecraft.py/Writer.missing_tags/original