Я преобразовал pdf в txt с помощью pdfminer. Проблема в том, что pdfminer добавляет \ n после конца строки в pdf, но предложение на этом не заканчивается. вы можете видеть, что каждая строка воспринимается как предложение в нижеследующем тексте, что неверно. Я также дал другую версию текста, чтобы показать, где находятся символы новых строк. например,
quan-
tum population.
должно быть в одном предложении. Я заменяю \ n на ", и проблема решена. Но другие \ n также заменяют, чего я не хочу.
Balanced Quantum Classical Evolutionary Algorithm(BQCEA)
Muhammad Shahid, Hasan Mujtaba, Muhammad Asim, Omer Beg
Abstract
With advancement in Quantum computing, classical algorithms are adapted and integrated
with Quantum properties such as qubit representation and entanglement. Although these
properties perform better however pre-mature convergence is the main issue in Quantum
Evolutionary Algorithms(QEA) because QEA uses only the best individual to update quan-
tum population. In this paper, we introduced a new way to update the quantum population
of QEA to avoid premature convergence
'Balanced Quantum Classical Evolutionary Algorithm(BQCEA)\n\nMuhammad Shahid, Hasan Mujtaba,
Muhammad Asim, Omer Beg\n\nAbstract\nWith advancement in Quantum computing, classical
algorithms are adapted and integrated\nwith Quantum properties such as qubit representation
and entanglement', ' Although these\nproperties perform better however pre-mature
convergence is the main issue in Quantum\nEvolutionary Algorithms(QEA) because QEA uses only
the best individual to update quan-\ntum population', ' In this paper, we introduced a new
way to update the quantum population\nof QEA to avoid premature convergence',
Я пробовал этот код.
lines =tokenize.sent_tokenize(txt_str)
for l in lines:
s = l.replace('\n', '')
print(s)
Это приводит к следующему.
Balanced Quantum Classical Evolutionary Algorithm(BQCEA)Muhammad Shahid, Hasan Mujtaba, Muhammad Asim, Omer BegAbstractWith advancement in Quantum computing, classical algorithms are adapted and integratedwith Quantum properties such as qubit representation and entanglement.
Although theseproperties perform better however pre-mature convergence is the main issue in QuantumEvolutionary Algorithms(QEA) because QEA uses only the best individual to update quan-tum population.
In this paper, we introduced a new way to update the quantum populationof QEA to avoid premature convergence.
но это нежелательный текст. Я хочу текст в этой версии.
Balanced Quantum Classical Evolutionary Algorithm(BQCEA)
Muhammad Shahid, Hasan Mujtaba, Muhammad Asim, Omer Beg
Abstract
With advancement in Quantum computing, classical algorithms are adapted and integrated with Quantum properties such as qubit representation and entanglement. Although these properties perform better however pre-mature convergence is the main issue in Quantum Evolutionary Algorithms(QEA) because QEA uses only the best individual to update quan-tum population. In this paper, we introduced a new way to update the quantum population of QEA to avoid premature convergence
Я не хочу, чтобы пустые строки исчезали. Надеюсь, ты понял.