MCPcopy Create free account
hub / github.com/FlyingFeather/DEA-SQL / mask_query_by_entities

Function mask_query_by_entities

fewshot/processor.py:17–22  ·  view source on GitHub ↗

masked query by entities

(query: str, entities: List[str])

Source from the content-addressed store, hash-verified

15
16
17def mask_query_by_entities(query: str, entities: List[str]) -> str:
18 """masked query by entities"""
19 masked_query = query
20 for entity in entities:
21 masked_query = masked_query.replace(entity, '<MASK>')
22 return masked_query
23
24
25def gen_mask_samples(input_file):

Callers 2

get_shots_by_modeFunction · 0.90
gen_mask_samplesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected