ratpmetro/main.py
def _define_incidents(self):
        """
        Define some keywords for identifying incidents from RATP tweets
        """
        # Keywords for operational incidents
        self.incident_words = ["perturbé", "interrompu", "ralenti"]

        # Incident causes and their keywords
        # Question: incident voie  -> autre ?
        #           diver incident -> autre ?
        # Some tweets are incomplete (thank you Twitter), like this one
        # > 07:56, le trafic est interrompu entre Chaussee d'Antin (La Fayette)
        # > et Trocadero. Reprise estimée à 09:00. (Personn… https://t.co/ZPsJrIlZBG
        # since the cause is not complete (even though it should be "voyageur",
        # it can only be classified as "autre"
        self.incident_causes = {
            "colis": ["colis", "bagage"],
            "technique": [
                "technique",
                "panne",
                "exploitation",
                "fumée",
                "rail",
                "aiguillage",
                "matériel",
            ],
            "voyageur": [
                "voyageur",
                "personne",
                "malveillance",
                "signal d'alarme",
                "affluence",
            ],
            # "chantier": ["chantier"],  # "fin tartive de chantier", in general not so much so -> autre
            "manifestation": [
                "mesure de sécurité"
            ],  # better name for this (in case of terrorist attacks also)?
        }
        self.incident_cause_other = "autre"

        Define some keywords for identifying incidents from RATP tweets
        
Define some keywords for identifying incidents from RATP tweets
Define some keywords for identifying incidents from RATP tweets
def _define_incidents(self):
        self.incident_words = ["perturbé", "interrompu", "ralenti"]
        self.incident_causes = {
            "colis": ["colis", "bagage"],
            "technique": [
                "technique",
                "panne",
                "exploitation",
                "fumée",
                "rail",
                "aiguillage",
                "matériel",
            ],
            "voyageur": [
                "voyageur",
                "personne",
                "malveillance",
                "signal d'alarme",
                "affluence",
            ],
            "manifestation": [
                "mesure de sécurité"
            ],  
        }
        self.incident_cause_other = "autre"
def _define_incidents ( self ) : self . incident_words = [ "perturbé", interrompu", ralenti"] self . incident_causes = { "colis" : [ "colis" , "bagage" ] , "technique" : [ "technique" , "panne" , "exploitation" , "fumée", "rail" , "aiguillage" , "matériel", ] , "voyageur" : [ "voyageur" , "personne" , "malveillance" , "signal d'alarme" , "affluence" , ] , "manifestation" : [ "mesure de sécurité" ] , } self . incident_cause_other = "autre"
Define some keywords for identifying incidents from RATP tweets
Define some keywords for identifying incidents from RATP tweets
"""
        Define some keywords for identifying incidents from RATP tweets
        """ # Keywords for operational incidents # Incident causes and their keywords # Question: incident voie  -> autre ? #           diver incident -> autre ? # Some tweets are incomplete (thank you Twitter), like this one # > 07:56, le trafic est interrompu entre Chaussee d'Antin (La Fayette) # > et Trocadero. Reprise estimée à 09:00. (Personn… https://t.co/ZPsJrIlZBG # since the cause is not complete (even though it should be "voyageur", # it can only be classified as "autre" # "chantier": ["chantier"],  # "fin tartive de chantier", in general not so much so -> autre # better name for this (in case of terrorist attacks also)?
self