Count the number of a variable :param variable: a variable :return: the number of a variable
(variable: Variable, sparql_executor)
| 140 | |
| 141 | |
| 142 | def count(variable: Variable, sparql_executor): |
| 143 | """ |
| 144 | Count the number of a variable |
| 145 | :param variable: a variable |
| 146 | :return: the number of a variable |
| 147 | """ |
| 148 | rtn_str = f"Observation: variable ##, which is a number" |
| 149 | new_variable = Variable("type.int", f"(COUNT {variable.program})") |
| 150 | return new_variable, rtn_str |
| 151 | |
| 152 | |
| 153 | def get_attributes(variable: Variable, sparql_executor): |