def map_info(self): if not self.location.known: if (self.address.location.gathered and self.address.location.known) or self.address.geolocate(): self.location = self.address.location if self.location.gathered and self.location.known: if self.name.defined(): the_info = self.name.full() else: the_info = capitalize(self.object_name()) the_info += ' [NEWLINE] ' + self.location.description result = { 'latitude': self.location.latitude, 'longitude': self.location.longitude, 'info': the_info } if hasattr(self, 'icon'): result['icon'] = self.icon elif self is this_thread.user: result['icon'] = { 'path': 'CIRCLE', 'scale': 5, 'strokeColor': 'blue' } return [result] return None
def pronoun_objective(self, **kwargs): """Returns "it" or "It" depending on the value of the optional keyword argument "capitalize." """ output = word('it', **kwargs) if 'capitalize' in kwargs and kwargs['capitalize']: return (capitalize(output)) else: return (output)
def pronoun_objective(self, **kwargs): """Returns "it" or "It" depending on the value of the optional keyword argument "capitalize." """ output = word('it', **kwargs) if 'capitalize' in kwargs and kwargs['capitalize']: return(capitalize(output)) else: return(output)
def yourself_or_name(self, **kwargs): if self == this_thread.user: output = word('yourself') else: output = self.name.full() if 'capitalize' in kwargs and kwargs['capitalize']: return(capitalize(output)) else: return(output)
def is_are_you(self, **kwargs): if self is this_thread.user: output = 'are you' else: output = 'is ' + str(self.name) if 'capitalize' in kwargs and kwargs['capitalize']: return(capitalize(output)) else: return(output)
def yourself_or_name(self, **kwargs): if self == this_thread.user: output = word("yourself") else: output = self.name.full() if "capitalize" in kwargs and kwargs["capitalize"]: return capitalize(output) else: return output
def yourself_or_name(self, **kwargs): if self == this_thread.user: output = word('yourself') else: output = self.name.full() if 'capitalize' in kwargs and kwargs['capitalize']: return (capitalize(output)) else: return (output)
def is_are_you(self, **kwargs): if self is this_thread.user: output = "are you" else: output = "is " + str(self.name) if "capitalize" in kwargs and kwargs["capitalize"]: return capitalize(output) else: return output
def is_are_you(self, **kwargs): if self is this_thread.user: output = 'are you' else: output = 'is ' + str(self.name) if 'capitalize' in kwargs and kwargs['capitalize']: return (capitalize(output)) else: return (output)
def is_are_you(self, **kwargs): """Returns "are you" if the object is the user, otherwise returns "is" followed by the object name.""" if self is this_thread.user: output = word('are you', **kwargs) else: output = is_word(self.full(), **kwargs) if 'capitalize' in kwargs and kwargs['capitalize']: return (capitalize(output)) else: return (output)
def pronoun_subjective(self, **kwargs): if self == this_thread.user and ('thirdperson' not in kwargs or not kwargs['thirdperson']): output = word('you') elif self.gender == 'female': output = word('she') else: output = word('he') if 'capitalize' in kwargs and kwargs['capitalize']: return(capitalize(output)) else: return(output)
def pronoun(self, **kwargs): if self == this_thread.user: output = word('you') if self.gender == 'female': output = word('her') else: output = word('him') if 'capitalize' in kwargs and kwargs['capitalize']: return(capitalize(output)) else: return(output)
def pronoun_possessive(self, target, **kwargs): if self == this_thread.user and ('thirdperson' not in kwargs or not kwargs['thirdperson']): output = your(target) elif self.gender == 'female': output = her(target) else: output = his(target) if 'capitalize' in kwargs and kwargs['capitalize']: return(capitalize(output)) else: return(output)
def pronoun_subjective(self, **kwargs): if self == this_thread.user and ("thirdperson" not in kwargs or not kwargs["thirdperson"]): output = word("you") elif self.gender == "female": output = word("she") else: output = word("he") if "capitalize" in kwargs and kwargs["capitalize"]: return capitalize(output) else: return output
def pronoun(self, **kwargs): if self == this_thread.user: output = word("you") if self.gender == "female": output = word("her") else: output = word("him") if "capitalize" in kwargs and kwargs["capitalize"]: return capitalize(output) else: return output
def pronoun_possessive(self, target, **kwargs): if self == this_thread.user and ("thirdperson" not in kwargs or not kwargs["thirdperson"]): output = your(target) elif self.gender == "female": output = her(target) else: output = his(target) if "capitalize" in kwargs and kwargs["capitalize"]: return capitalize(output) else: return output
def pronoun(self, **kwargs): if self == this_thread.user: output = word('you') if self.gender == 'female': output = word('her') else: output = word('him') if 'capitalize' in kwargs and kwargs['capitalize']: return (capitalize(output)) else: return (output)
def is_are_you(self, **kwargs): """Returns "are you" if the object is the user, otherwise returns "is" followed by the object name.""" if self is this_thread.user: output = word('are you', **kwargs) else: output = is_word(self.full(), **kwargs) if 'capitalize' in kwargs and kwargs['capitalize']: return(capitalize(output)) else: return(output)
def yourself_or_name(self, **kwargs): """Returns a "yourself" if the individual is the user, otherwise returns the individual's name.""" if self == this_thread.user: output = word('yourself', **kwargs) else: output = self.name.full() if 'capitalize' in kwargs and kwargs['capitalize']: return(capitalize(output)) else: return(output)
def yourself_or_name(self, **kwargs): """Returns a "yourself" if the individual is the user, otherwise returns the individual's name.""" if self == this_thread.user: output = word('yourself', **kwargs) else: output = self.name.full() if 'capitalize' in kwargs and kwargs['capitalize']: return (capitalize(output)) else: return (output)
def pronoun(self, **kwargs): """Returns a pronoun like "you," "her," or "him," as appropriate.""" if self == this_thread.user: output = word('you', **kwargs) if self.gender == 'female': output = word('her', **kwargs) else: output = word('him', **kwargs) if 'capitalize' in kwargs and kwargs['capitalize']: return(capitalize(output)) else: return(output)
def pronoun_possessive(self, target, **kwargs): """Given a word like "fish," returns "her fish" or "his fish," as appropriate.""" if self == this_thread.user and ('thirdperson' not in kwargs or not kwargs['thirdperson']): output = your(target, **kwargs) elif self.gender == 'female': output = her(target, **kwargs) else: output = his(target, **kwargs) if 'capitalize' in kwargs and kwargs['capitalize']: return(capitalize(output)) else: return(output)
def pronoun_subjective(self, **kwargs): """Returns a pronoun like "you," "she," or "he," as appropriate.""" if self == this_thread.user and ('thirdperson' not in kwargs or not kwargs['thirdperson']): output = word('you', **kwargs) elif self.gender == 'female': output = word('she', **kwargs) else: output = word('he', **kwargs) if 'capitalize' in kwargs and kwargs['capitalize']: return(capitalize(output)) else: return(output)
def pronoun_subjective(self, **kwargs): if self == this_thread.user and ('thirdperson' not in kwargs or not kwargs['thirdperson']): output = word('you') elif self.gender == 'female': output = word('she') else: output = word('he') if 'capitalize' in kwargs and kwargs['capitalize']: return (capitalize(output)) else: return (output)
def pronoun(self, **kwargs): """Returns a pronoun like "you," "her," or "him," as appropriate.""" if self == this_thread.user: output = word('you', **kwargs) if self.gender == 'female': output = word('her', **kwargs) else: output = word('him', **kwargs) if 'capitalize' in kwargs and kwargs['capitalize']: return (capitalize(output)) else: return (output)
def pronoun_possessive(self, target, **kwargs): if self == this_thread.user and ('thirdperson' not in kwargs or not kwargs['thirdperson']): output = your(target) elif self.gender == 'female': output = her(target) else: output = his(target) if 'capitalize' in kwargs and kwargs['capitalize']: return (capitalize(output)) else: return (output)
def pronoun_possessive(self, target, **kwargs): """Given a word like "fish," returns "her fish" or "his fish," as appropriate.""" if self == this_thread.user and ('thirdperson' not in kwargs or not kwargs['thirdperson']): output = your(target, **kwargs) elif self.gender == 'female': output = her(target, **kwargs) else: output = his(target, **kwargs) if 'capitalize' in kwargs and kwargs['capitalize']: return (capitalize(output)) else: return (output)
def pronoun_subjective(self, **kwargs): """Returns a pronoun like "you," "she," or "he," as appropriate.""" if self == this_thread.user and ('thirdperson' not in kwargs or not kwargs['thirdperson']): output = word('you', **kwargs) elif self.gender == 'female': output = word('she', **kwargs) else: output = word('he', **kwargs) if 'capitalize' in kwargs and kwargs['capitalize']: return (capitalize(output)) else: return (output)
def map_info(self): response = list() for office in self.office: if (office.location.gathered and office.location.known) or office.geolocate(): if self.name.defined(): the_info = self.name.full() else: the_info = capitalize(self.object_name()) the_info += ' [NEWLINE] ' + office.location.description this_response = {'latitude': office.location.latitude, 'longitude': office.location.longitude, 'info': the_info} if hasattr(self, 'icon'): this_response['icon'] = self.icon response.append(this_response) if len(response): return response return None
def _map_info(self): if not self.location.known: if (self.address.location.gathered and self.address.location.known) or self.address.geolocate(): self.location = self.address.location if self.location.gathered and self.location.known: if self.name.defined(): the_info = self.name.full() else: the_info = capitalize(self.object_name()) the_info += ' [NEWLINE] ' + self.location.description result = {'latitude': self.location.latitude, 'longitude': self.location.longitude, 'info': the_info} if hasattr(self, 'icon'): result['icon'] = self.icon elif self is this_thread.user: result['icon'] = {'path': 'CIRCLE', 'scale': 5, 'strokeColor': 'blue'} return [result] return None
def map_info(self): if not self.location.known: if (self.address.location.gathered and self.address.location.known) or self.address.geolocate(): self.location = self.address.location if self.location.gathered and self.location.known: if self.name.defined(): the_info = self.name.full() else: the_info = capitalize(self.object_name()) the_info += " [NEWLINE] " + self.location.description result = {"latitude": self.location.latitude, "longitude": self.location.longitude, "info": the_info} if hasattr(self, "icon"): result["icon"] = self.icon elif self is this_thread.user: result["icon"] = {"path": "CIRCLE", "scale": 5, "strokeColor": "blue"} return [result] return None
def map_info(self): response = list() for office in self.office: if (office.location.gathered and office.location.known) or office.geolocate(): if self.name.defined(): the_info = self.name.full() else: the_info = capitalize(self.object_name()) the_info += " [NEWLINE] " + office.location.description this_response = { "latitude": office.location.latitude, "longitude": office.location.longitude, "info": the_info, } if hasattr(self, "icon"): this_response["icon"] = self.icon response.append(this_response) if len(response): return response return None
def map_info(self): response = list() for office in self.office: if (office.location.gathered and office.location.known) or office.geolocate(): if self.name.defined(): the_info = self.name.full() else: the_info = capitalize(self.object_name()) the_info += ' [NEWLINE] ' + office.location.description this_response = { 'latitude': office.location.latitude, 'longitude': office.location.longitude, 'info': the_info } if hasattr(self, 'icon'): this_response['icon'] = self.icon response.append(this_response) if len(response): return response return None