File tree Expand file tree Collapse file tree
examples/pbe/transduction/knowledge_graph Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ def filter_constants(constants: List[str]) -> List[str]:
104104 return [x for x in constants if not (len (x ) == 1 and x .lower () in ALPHA_NUMERIC )]
105105
106106
107+ to_update = set ([])
107108if __name__ == "__main__" :
108109 argument_parser : argparse .ArgumentParser = argparse .ArgumentParser (
109110 description = "Preporocess transduction tasks to find constants."
@@ -144,7 +145,7 @@ def filter_constants(constants: List[str]) -> List[str]:
144145 print (f"[N°{ i } ] { task .metadata ['name' ]} " )
145146 print ("Sample:" , pbe .examples [0 ].output )
146147 constants = task .metadata .get ("constants" , None )
147- if constants is None or task .metadata ["name" ] == "head date french." :
148+ if constants is None or task .metadata ["name" ] in to_update :
148149 all_possibles = [
149150 filter_constants (
150151 find_constants (
@@ -185,7 +186,7 @@ def filter_constants(constants: List[str]) -> List[str]:
185186 print ()
186187
187188 constants_in = task .metadata .get ("constants_in" , None )
188- if constants_in is None :
189+ if constants_in is None or task . metadata [ "name" ] in to_update :
189190 all_possibles = [
190191 filter_constants (
191192 find_constants (
You can’t perform that action at this time.
0 commit comments