Чистый текст из PDF-файлов

это скорее алгоритмический вопрос, чем конкретный языковой вопрос, поэтому я буду рад получить ответ на любом языке -, даже на псевдокоде, даже просто на идею.

Вот моя проблема :Мне нужно работать с большим набором данных из статей в формате PDF, которые были грубо скопированы/вставлены в.txt. У меня есть только результат этой мерзости, который составляет около 16 тыс. статей на 3,5 ГБ или текст (, корпус, который я использую, - это сеть антологий ACL,http://clair.si.umich.edu/clair/aan/DatasetContents.html).

«Мусор» происходит из таких вещей, как формулы, изображения, таблицы и так далее. Он просто появляется посреди бегущего текста, поэтому я не могу использовать регулярные выражения для его очистки, и я также не могу придумать, как использовать для него машинное обучение. Я уже потратил на это неделю, а потом решил перейти к быстрому и грязному исправлению. Я больше не забочусь о его полной очистке, меня не волнуют ложные негативы и срабатывания, если большая часть этих областей текста удалена.

Некоторые примеры текста :отмечают, что формулы содержат ненужные символы, а таблицы и подписи — нет (но они все же делают мое предложение очень длинным и, следовательно, неразборчивым ). Мусор выделен жирным шрифтом.

Легкий:

The experiments were repeated while inhibiting specialization of first the scheme with the most expansions, and then the two most expanded schemata. Measures of coverage and speedup are important 1 As long as we are interested in preserving the f-structure assigned to sentences, this notion of coverage is stricter than necessary. The same f-structure can in fact be assigned by more than one parse, so that in some cases a sentence is considered out of coverage even if the specialized grammar assigns to it the correct f-structure. 2'VPv' and 'VPverb[main]' cover VPs headed by a main verb. 'NPadj' covers NPs with adjectives attached. 205 The original rule: l/Pperfp --+ ADVP* SE (t ADJUNCT) ($ ADV_TYPE) = t,padv ~/r { @M_Head_Perfp I@M_Head_Passp } @( Anaph_Ctrl $) { AD VP+ SE ('~ ADJUNCT) ($ ADV_TYPE) = vpadv is replaced by the following: ADVP,[.E (~ ADJUNCT) (.l. ADV_TYPE) = vpadv l/'Pperfp --+ @PPadjunct @PPcase_obl {@M.Head_Pevfp [@M..Head_Passp} @( Anaph_Ctrl ~ ) V { @M_Head_Perfp I@M_Head_Passp } @( Anaph_Ctrl ~) Figure 1: The pruning of a rule from the actual French grammar. The "*" and the "+" signs have the usual interpretation as in regular expressions. A sub-expression enclosed in parenthesis is optional. Alternative sub-expressions are enclosed in curly brackets and separated by the "[" sign. An "@" followed by an identifier is a macro expansion operator, and is eventually replaced by further functional descriptions. Corpus --.. ,, 0.1[ Disambiguated Treebank treebank Human expert Grammar specialization Specialized grammar Figure 2: The setting for our experiments on grammar specialization. indicators of what can be achieved with this form of grammar pruning. However, they could potentially be misleading, since failure times for uncovered sentences might be considerably lower than their sentences times, had they not been out of coverage.

Жесткий:

Table 4 summarizes the precision results for both English and Romanian coreference. The results indicate that the English coreference is more indicate than the Romanian coreference, but SNIZZLE improves coreference resolution in both languages. There were 64% cases when the English coreference was resolved by a heuristic with higher priority than the corresponding heuristic for the Romanian counterpart. This result explains why there is better precision enhancement for English Romanian SWIZZLE on English SWIZZLE on Romanian Nominal Pronominal 73% 89% 66% 78% 76% 93% 71°/o 82% Table 4: Coreference precision Total 84% 72% 87% 76% English Romanian SWIZZLE on English SWIZZLE on Romanian Nominal 69% 63% 66% 61% Pronominal Total 89% 78% 83% 72% 87% 77% 80% 70% Table 5: Coreference recall the English coreference. Table 5 also illustrates the recall results. The advantage of the data-driven coreference resolution over other methods is based on its better recall performance. This is explained by the fact that this method captures a larger variety of coreference patterns. Even though other coreference resolution systems perform better for some specific forms of systems, their recall results are surpassed by the systems approach. Multilingual coreference in turn improves more the precision than the recall of the monolingual data-driven coreference systems. In addition, Table 5 shows that the English coref- erence results in better recall than Romanian coref- erence. However, the recall shows a decrease for both languages for SNIZZLE because imprecise coreference links are deleted. As is usually the case, deleting data lowers the recall. All results were obtained by using the automatic scorer program developed for the MUC evaluations.

Обратите внимание, что таблица не содержит странных символов и находится прямо в середине предложения :«Этот результат объясняет, почему для -ТАБЛИЦА ЗДЕСЬ -английская кореференция имеет лучшее повышение точности». Я не могу знать, где будет таблица по отношению к бегущему тексту. Оно может стоять перед предложением, после него или внутри него, как в данном случае. Также обратите внимание, что табличное дерьмо не заканчивается точкой (большинство подписей в газетах не... )поэтому я не могу полагаться на пунктуацию, чтобы определить это. Меня, конечно, устраивают неточные -границы, но с этими таблицами еще нужно что-то делать. Некоторые из них содержат слова, а не цифры,и у меня недостаточно информации в этих случаях :ни ненужных символов, ничего. Это очевидно только людям :S

8
задан Tex 3 May 2012 в 15:08
поделиться