(s)
| 62 | emb_list = [] |
| 63 | |
| 64 | def split_string(s): |
| 65 | s = s.replace("“", '"').replace("”", '"').replace("'", '''"''') # use english quotes |
| 66 | result = [] |
| 67 | in_quotes = False |
| 68 | temp = "" |
| 69 | |
| 70 | for idx,char in enumerate(s): |
| 71 | if char == '"' and idx>155: |
| 72 | temp += char |
| 73 | if not in_quotes: |
| 74 | result.append(temp) |
| 75 | temp = "" |
| 76 | |
| 77 | in_quotes = not in_quotes |
| 78 | continue |
| 79 | if in_quotes: |
| 80 | if char.isspace(): |
| 81 | pass # have space token |
| 82 | |
| 83 | result.append("“" + char + "”") |
| 84 | else: |
| 85 | temp += char |
| 86 | |
| 87 | if temp: |
| 88 | result.append(temp) |
| 89 | |
| 90 | return result |
| 91 | |
| 92 | for idx, (txt, imgs) in enumerate(zip(text_list, ref_images)): |
| 93 |
nothing calls this directly
no outgoing calls
no test coverage detected