DE102021006511A1 - Method and device for machine processing of texts - Google Patents

Method and device for machine processing of texts Download PDF

Info

Publication number
DE102021006511A1
DE102021006511A1 DE102021006511.5A DE102021006511A DE102021006511A1 DE 102021006511 A1 DE102021006511 A1 DE 102021006511A1 DE 102021006511 A DE102021006511 A DE 102021006511A DE 102021006511 A1 DE102021006511 A1 DE 102021006511A1
Authority
DE
Germany
Prior art keywords
word
sentence
words
probability
text
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
DE102021006511.5A
Other languages
German (de)
Inventor
Marc Ebner
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Univ Greifswald Koerperschaft Des Oeffentlichen Rechts
Universitaet Greifswald Koerperschaft Des Oeffentlichen Rechts
Original Assignee
Univ Greifswald Koerperschaft Des Oeffentlichen Rechts
Universitaet Greifswald Koerperschaft Des Oeffentlichen Rechts
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Univ Greifswald Koerperschaft Des Oeffentlichen Rechts, Universitaet Greifswald Koerperschaft Des Oeffentlichen Rechts filed Critical Univ Greifswald Koerperschaft Des Oeffentlichen Rechts
Priority to DE102021006511.5A priority Critical patent/DE102021006511A1/en
Publication of DE102021006511A1 publication Critical patent/DE102021006511A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/3332Query translation
    • G06F16/3334Selection or weighting of terms from queries, including natural language queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3346Query execution using probabilistic model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/242Dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Abstract

Die vorliegende Erfindung betrifft ein Verfahren zum maschinellen Verarbeiten eines Textes. Es umfasst folgende Schritte: Zunächst wird ein Text erfasst und gespeichert, wobei jedem erfassten Wort ein Wert zugeordnet wird. Dieser Wert kann z.B. durch einen k-dimensionalen Vektor repräsentiert werden. Dann wird für eine Sequenz des Textes und für ein Wort der Sequenz eine erste Wahrscheinlichkeit bestimmt, mit der das Wort in der Sequenz in Kombination mit einem bestimmen Zustand vorkommt. Dieser Zustand berechnet sich aus den Werten von in der Sequenz zu dem Wort benachbarten Worten, beispielsweise durch Addition, ggf. mit anschließender Skalierung. Die erste Wahrscheinlichkeit, mit der das Wort in der Sequenz in Kombination mit dem Zustand vorkommt, kann auf Basis des Wertes des Wortes in Bezug zu dem Zustand berechnet werden, beispielsweise als Häufigkeit des Wortes für einen diskreten Zustand.The present invention relates to a method for machining a text. It comprises the following steps: First, a text is recorded and saved, with each recorded word being assigned a value. For example, this value can be represented by a k-dimensional vector. A first probability is then determined for a sequence of the text and for a word of the sequence, with which the word occurs in the sequence in combination with a specific state. This state is calculated from the values of words adjacent to the word in the sequence, for example by addition, possibly with subsequent scaling. The first probability that the word occurs in the sequence in combination with the state can be calculated based on the value of the word in relation to the state, for example as a frequency of the word for a discrete state.

Description

Die Erfindung betrifft ein Verfahren und eine Vorrichtung zum maschinellen Verarbeiten von Texten. Insbesondere betrifft die Erfindung ein maschinelles Erzeugen von Sätzen, basierend auf einer vorgegebenen Textbasis und mit Bezug zu einem Anfragesatz.The invention relates to a method and a device for machine processing of texts. In particular, the invention relates to machine generation of sentences based on a given text base and with reference to a query sentence.

Technologischer HintergrundTechnological background

Nach derzeitigem Verständnis wird Sprache im menschlichen Gehirn in einem neuronalen Netz verteilt gespeichert und wieder abgerufen. Vergleichbares soll auch mit künstlichen neuronalen Netzen erreicht werden.According to current understanding, language is stored and retrieved in the human brain in a neural network. Something similar should also be achieved with artificial neural networks.

Beispiele hierfür sind in der Literatur in folgenden Artikeln beschrieben:

  • A. Radford, K. Narasimhan, T. Salimans, and I. Sutskever, „Improving language understanding by generative pre-training“, Preprint, 2018.
  • A. Radford, J. Wu, R. Child, D. Luan, D. Amodei, and I. Sutskever, „Language models are unsupervised multitask learners“, Preprint, 2019.
  • T. B. Brown, B. Mann, N. Ryder, M. Subbiah, J. Kaplan, P. Dhariwal, A. Neelakantan, P. Shyam, G. Sastry, A. Askell, S. Agarwal, A. Herbert-Voss, G. Krueger, T. Henighan, R. Child, A. Ramesh, D. M. Ziegler, J. Wu, C. Winter, C. Hesse, M. Chen, E. Sigler, M. Litwin, S. Gray, B. Chess, J. Clark, C. Berner, S. McCandlish, A. Radford, I. Sutskever, and D. Amodei, „Language models are few-shot learners,“ Preprint, 2020.
  • Neuronale Netze werden anhand sehr großer Datenmengen trainiert. Die Information, wie Sprache erzeugt wird, liegt dabei im Wesentlichen in den Gewichten des Netzwerks vor. Das Training der Netzwerke ist sehr aufwendig und benötigt sehr viel Rechenleistung, da die Gewichte in der Regel durch Gradientenabstiegsverfahren trainiert werden.
  • Für das Erzeugen natürlicher Sprache gibt es verschiedene Ansätze. Es kann eine Grammatik definiert werden, wie dies exemplarisch in den folgenden Schriften beschrieben ist:
  • S. Bangalore and O. C. Rainbow, „System and method for natural language generation“, United States Patent US 7,562,005 , July 2009.
  • A. Ratnaparkhi, „Trainable dynamic phrase reordering for natural language generation in conversational systems“, United States Patent Application US 2002/0116173 A1 , Aug. 2002.
Examples of this are described in the literature in the following articles:
  • A Radford, K Narasimhan, T Salimans, and I Sutskever, Improving language understanding by generative pre-training, Preprint, 2018.
  • Radford A, Wu J, Child R, Luan D, Amodei D, and Sutskever I, “Language models are unsupervised multitask learners”, Preprint, 2019.
  • Brown TB, Mann B, Ryder N, Subbiah M, Kaplan J, Dhariwal P, Neelakantan A, Shyam P, Sastry G, Askell A, Agarwal S, Herbert-Voss A, G Krueger, T Henighan, R Child, A Ramesh, DM Ziegler, J Wu, C Winter, C Hesse, M Chen, E Sigler, M Litwin, S Gray, B Chess, Clark J, Berner C, McCandlish S, Radford A, Sutskever I, and Amodei D, "Language models are few-shot learners," Preprint, 2020.
  • Neural networks are trained using very large amounts of data. The information on how speech is generated is essentially available in the weights of the network. Training the networks is very complex and requires a great deal of computing power, since the weights are usually trained using gradient descent methods.
  • There are different approaches to generating natural language. A grammar can be defined, as is described in the following publications:
  • S. Bangalore and OC Rainbow, "System and method for natural language generation", United States Patent U.S. 7,562,005 , July 2009.
  • A. Ratnaparkhi, "Trainable dynamic phrase reordering for natural language generation in conversational systems", United States Patent Application U.S. 2002/0116173 A1 , Aug 2002.

Weiterhin besteht die Möglichkeit, eine Vielzahl von Schablonen zur Spracherzeugung zu definieren, die dann mit Inhalten gefüllt werden. Ein Nachteil derartiger Ansätze ist die Einschränkung der möglichen Sätze auf diejenigen, die durch die Schablonen vorgegeben sind.It is also possible to define a large number of templates for speech generation, which are then filled with content. A disadvantage of such approaches is that the possible sentences are limited to those given by the templates.

Die große Mehrheit bekannter Ansätze arbeitet mit statistischen Methoden, wie dies z.B. in den folgenden Dokumenten beschrieben ist:

  • F. Schilder, „Systems and methods for natural language generation“, United States Patent Application US 2014/0149107 A1 , May 2014.
  • B. Howald, R. Kondadadi, and F. Schilder, „Systems and methods for natural language generation,“ United States Patent US 9,424,254 , Aug. 2016.
  • A. Kaeser, E. Vignon, and L. Stoeckl6, „Systems and methods for natural language generation“, United States Patent US 9,411,804, Aug. 2016.
  • Letztendlich extrahieren künstliche neuronale Netze auch nur statistisch relevante Informationen aus den Datensätzen, die für das Training verwendet werden.
The vast majority of known approaches work with statistical methods, as described in the following documents, for example:
  • F. Schilder, "Systems and methods for natural language generation", United States Patent Application U.S. 2014/0149107 A1 , May 2014.
  • B. Howald, R. Kondadadi, and F. Schilder, "Systems and methods for natural language generation," United States Patent U.S. 9,424,254 , Aug 2016.
  • A. Kaeser, E. Vignon, and L. Stoeckl6, "Systems and methods for natural language generation", United States Patent US 9,411,804, Aug. 2016.
  • Ultimately, artificial neural networks also only extract statistically relevant information from the data sets used for training.

Der Erfinder hatte bereits vor einiger Zeit ein Verfahren entwickelt, um Sätze in n-Tupel zu zerlegen und anschließend wieder zusammenzufügen. Dieses Verfahren ist im nachstehend angegebenen Artikel sowie in der DE 10 2016 125 162 B4 beschrieben:

  • M. Ebner, „Distributed storage and recall of sentences“, Bio-Algorithms and Med-Systems, vol. 13, no. 2, pp. 89-101, 2017.
Some time ago, the inventor had developed a method for breaking down sentences into n-tuples and then putting them back together again. This procedure is described in the article identified below, as well as in the DE 10 2016 125 162 B4 described:
  • M. Ebner, "Distributed storage and recall of sentences", Bio-Algorithms and Med-Systems, vol. 13, no. 2, pp. 89-101, 2017.

Für jedes n-Tupel werden dabei Worte mit ihren zugehörigen Häufigkeiten abgelegt. Für die Verarbeitung werden Worte in der Regel durch Indizes in ein vorhandenes Vokabular ersetzt.Words with their associated frequencies are stored for each n-tuple. For processing, words are usually replaced by indices into an existing vocabulary.

Die einzelnen Wörter sind im Vokabular entsprechend ihrer Häufigkeit im Text sortiert, so dass das Wort, das am seltensten im Textkorpus vorkommt, den höchsten Index hat. Satzzeichen werden wie Worte behandelt. Die Satzendezeichen „.“, „?“ und „!“ erhalten z.B. die Indizes 1,2,3. Der Index 0 bleibt für ein im Wortschatz unbekanntes Wort reserviert. Danach folgen in aufsteigender Reihenfolge die Zeichen „,“, „:“ und „;“. Danach folgen die Worte „die“, „der“, „und“, „das“ in der deutschen Sprache. In der englischen Sprache folgen die Worte „the“, „to“, „a“, and „I“.The individual words are sorted in the vocabulary according to their frequency in the text, so that the word that occurs least frequently in the text corpus has the highest index. Punctuation marks are treated like words. For example, the end-of-sentence characters ".", "?" and "!" are given the indices 1,2,3. Index 0 is reserved for a word unknown in the vocabulary. This is followed in ascending order by the characters ",", ":" and ";". This is followed by the words "die", "der", "und", "das" in the German language. In the English language, the words "the", "to", "a", and "I" follow.

Es sei allgemein w1w2w3 ... wl ein Satz der Länge I, wobei wi die Indizes der Worte des Vokabulars sind. Zum Training wird der gesamte zur Verfügung stehende Textkorpus in Sätze unterteilt und die Worte auf die Indizes abgebildet. Man berechnet für n > 0 die Wahrscheinlichkeit pn(wi(|wi-n ... wi-1), indem man für eine gegebene Folge wi-1 ... wi-1 zählt, welche Wörter wie oft auf diese Sequenz folgen.In general, let w 1 w 2 w 3 ... w l be a sentence of length I, where w i are the indices of the words of the vocabulary. For training, the entire available text corpus is divided into sentences and the words are mapped to the indices. One calculates the probability p n (w i (|w in ... w i-1 ) for n > 0 by counting which words are listed how often for a given sequence w i-1 ... w i-1 follow this sequence.

Realistischerweise werden diese Wahrscheinlichkeiten nur für n = 1 und n = 2 berechnet, denn die Zahl der möglichen Sequenzen steigt exponentiell an. Für n = 3 wird also bereits erheblich mehr Speicherplatz benötigt als für n = 2.Realistically, these probabilities are only calculated for n = 1 and n = 2, since the number of possible sequences increases exponentially. Considerably more storage space is required for n = 3 than for n = 2.

Eine Folge von Worten eines Satzes wird im Bereich der Computerlinguistik als n-Gramm bezeichnet, wie dies beispielsweise in folgenden Schriften beschrieben ist:

  1. C. D. Manning and H. Schütze, Foundations of Statistical Natural Language Processing. Cambridge, Massachusetts: The MIT Press, 1999.
  2. C. D. Manning, P. Raghavan, and H. Schütze, Introduction to Information Retrieval. New York, NY: Cambridge University Press, 2008.
A sequence of words in a sentence is referred to as an n-gram in computational linguistics, as is described in the following publications, for example:
  1. CD Manning and H. Schütze, Foundations of Statistical Natural Language Processing. Cambridge, Massachusetts: The MIT Press, 1999.
  2. CD Manning, P Raghavan, and H Schütze, Introduction to Information Retrieval. New York, NY: Cambridge University Press, 2008.

Derartige n-Gramme können zu einer Clusteranalyse von Webseiten oder auch zum Unterscheiden verschiedener Sprachen genutzt werden, wie dies beispielhaft in den folgenden Dokumenten angegeben ist:

  • A. Z. Broder, S. C. Glassman, M. S. Manasse, and G. Zweig, „Syntactic clustering of the web,“ SRC Technical Note, July 1997.
  • T. Dunning, „Statistical identification of language,“ Technical Report MCCS 94-273, Mar. 1994.
Such n-grams can be used for a cluster analysis of websites or to differentiate between different languages, as is given by way of example in the following documents:
  • AZ Broder, SC Glassman, MS Manasse, and G. Zweig, "Syntactic clustering of the web," SRC Technical Note, July 1997.
  • T. Dunning, "Statistical identification of language," Technical Report MCCS 94-273, Mar. 1994.

Im Folgenden wird die Lehre der DE 10 2016 125 162 B4 zum besseren Verständnis der verbleibenden Probleme, und zum besseren Verständnis der dann beschriebenen vorliegenden Erfindung knapp skizziert.The following is the teaching of DE 10 2016 125 162 B4 for a better understanding of the remaining problems, and for a better understanding of the present invention then described.

Die Wahrscheinlichkeit p1(wilwi-1) gibt an, welches Wort auf das Wort wi-1 folgen kann.The probability p 1 (w i lw i-1 ) indicates which word can follow word w i-1 .

Allgemein kann eine solche Wahrscheinlichkeit für jedes n E N bestimmt werden: p n ( w i | w i n w i ( n 1 ) w i 1 ) .

Figure DE102021006511A1_0001
In general, such a probability can be determined for each n EN: p n ( w i | w i n w i ( n 1 ) ... w i 1 ) .
Figure DE102021006511A1_0001

Wenn hier und im Folgenden der Begriff „Wahrscheinlichkeit“ verwendet wird, so ist dieser Begriff etwas weiter zu verstehen als im streng mathematischen Sinn. Das heißt, dass eine „Wahrscheinlichkeit“ im Sinne der vorliegenden Anmeldung nicht stets notwendigerweise einen Wert zwischen 0 und 1 annehmen muss (wie eine Wahrscheinlichkeit im mathematischen Sinne). Es reicht oft aus, wenn als „Wahrscheinlichkeit“ ein Wert bestimmt wird, der es ermöglicht, die Häufigkeit des Auftretens einer bestimmten Konstellation (z.B. das Auftreten eines Wortes in Kombination mit einem oder mehreren anderen Worten in einer vorgegebenen Umgebung) mit der Häufigkeit des Auftretens entsprechender Konstellationen zu vergleichen. Ein korrektes Verständnis des Begriffs der „Wahrscheinlichkeit“ ergibt sich dann stets aus den angegebenen Begleitumständen.If the term "probability" is used here and in the following, this term is to be understood in a somewhat broader sense than in the strictly mathematical sense. This means that a "probability" in the sense of the present application does not always necessarily have to assume a value between 0 and 1 (like a probability in the mathematical sense). It is often sufficient if a value is determined as the "probability" which makes it possible to compare the frequency of occurrence of a certain constellation (e.g. the occurrence of a word in combination with one or more other words in a given environment) with the frequency of occurrence to compare corresponding constellations. A correct understanding of the concept of "probability" then always results from the accompanying circumstances given.

Zusätzlich zu der Wahrscheinlichkeit pn kann auch eine Wahrscheinlichkeit angegeben werden dafür, dass ein Wort auftritt in Abhängigkeit von einem vorhergehenden Wort mit einer gewissen Distanz t: pΔt=t(wi|wi-1-t) für t ∈ {1,2, ..., tmax},In addition to the probability p n , a probability can also be specified for a word occurring as a function of a preceding word with a certain distance t: p Δt=t (w i |w i-1-t ) for t ∈ {1 ,2, ..., t max },

Je weiter man im Text zurück geht, desto weniger Einfluss hat das Wort an Position wi-1-t in der Regel auf das Wort wi. Ein sinnvoller Wert für tmax liegt daher zumeist bei höchstens 5. The further one goes back in the text, the less influence the word at position w i-1-t usually has on the word w i . A reasonable value for t max is therefore usually at most 5.

Die einzelnen, vorstehend beschriebenen Wahrscheinlichkeiten können über eine oder mehrere vorgegebene mathematische Operationen kombiniert werden, wie z.B. eine Minimum-, Addition-, Multiplikation- oder ähnliche Operation. Auf diese Weise können einzelne Wortoptionen oder Kombinationen eliminiert werden.The individual probabilities described above can be combined via one or more predetermined mathematical operations, such as a minimum, addition, multiplication or similar operation. In this way, individual word options or combinations can be eliminated.

Eine Verknüpfung oder Kombination verschiedener Wahrscheinlichkeiten mittels einer dieser Operationen wird im Folgenden wie folgt notiert: Sollen verschiedene distanzabhängige Wahrscheinlichkeiten pΔt=t für verschiedene t kombiniert werden, so könnte dies knapp lauten: p Δ t = o p j = 1, , t { p Δ t = j ( w i | w i j ) }

Figure DE102021006511A1_0002
Beispielsweise könnte dann mittels einer Kombination von pΔt und p2 die eingangs beschriebene, wegen des riesigen Speicherbedarfs praktisch kaum zu berechnende Wahrscheinlichkeit p(wi |w1w2 ... wi-1) wie folgt approximiert werden: p ( w i | w 1 w 2 w i 1 ) o p ( p 2 ( w i | w i 2 w i 1 ) ; p Δ t ( w i ) )
Figure DE102021006511A1_0003
A link or combination of different probabilities using one of these operations is noted below as follows: If different distance-dependent probabilities p Δt=t are to be combined for different t, this could briefly be: p Δ t = O p j = 1, ... , t { p Δ t = j ( w i | w i j ) }
Figure DE102021006511A1_0002
For example, using a combination of p Δt and p 2 , the probability p(w i | w 1 w 2 ... w i-1 ) described at the beginning, which is practically impossible to calculate due to the huge memory requirement, could be approximated as follows: p ( w i | w 1 w 2 ... w i 1 ) O p ( p 2 ( w i | w i 2 w i 1 ) ; p Δ t ( w i ) )
Figure DE102021006511A1_0003

Allerdings ist, wie vom Erfinder schon früher erkannt, auch dieser Ansatz noch zu verbessern, um zu erzeugende Sätze bei weniger Ressourcenverbrauch noch akkurater zu erzeugen.However, as recognized earlier by the inventor, this approach can still be improved in order to generate sentences to be generated even more accurately with less resource consumption.

Dazu ist in der DE 10 2016 125 162 B4 vorgeschlagen worden, für jeden Satz eine gewissen Anzahl von Worten mit der kleinsten Häufigkeit im Textkorpus beim Durchlaufen des Satzes festzuhalten (diese Anzahl wird z.B. mit mn bezeichnet).For this is in the DE 10 2016 125 162 B4 It has been proposed to record for each sentence a certain number of words with the lowest frequency in the text corpus when running through the sentence (this number is denoted by m n , for example).

In 1 ist dies exemplarisch illustriert.In 1 this is illustrated as an example.

Es sei mi,j das j-seltenste Wort, das beim Lesen des angegebenen Satzes von links nach rechts bis zur Position i angetroffen wurde. Lesen wir den Beispielsatz
„Ich hoffe, dass morgen die Sonne scheint.“,
so steht an der 7. Position im Satz das Wort „Sonne“ (das Komma nimmt ebenfalls eine Position ein). Lesen wir bis zur 7. Position den Satz, so haben wir als seltenstes Wort „Sonne“, als zweitseltenstes Wort „hoffe“ und als drittseltenstes Wort „morgen“ gelesen.
Let mi,j be the j-rarest word encountered while reading the given sentence from left to right up to position i. Let's read the example sentence
"I hope the sun will shine tomorrow.",
the word “sun” is in the 7th position in the sentence (the comma also occupies one position). If we read the sentence up to the 7th position, we have read “Sonne” as the rarest word, “Hope” as the second rarest word and “Tomorrow” as the third rarest word.

Diese Worte („Sonne“, „hoffe“, „morgen“) fassen das bisher gesagte zusammen.These words ("sun", "hope", "tomorrow") summarize what has been said so far.

Stoppworte, wie Satzzeichen oder Artikel, werden eliminiert.Stop words, such as punctuation marks or articles, are eliminated.

Wir können diese Information dann nutzen, um auf das folgende Wort „scheint“ zu schließen.We can then use this information to infer the following word "seems".

In 1 ist also spaltenweise jeweils gezeigt, welche mn = 3 Worte mit der kleinsten Häufigkeit bei Durchlaufen des Satzes in Leserichtung bislang aufgefunden worden sind. Für jede Satzposition ist dies in 1 angegeben.In 1 it is therefore shown in columns which m n = 3 words have been found with the smallest frequency when running through the sentence in the reading direction. For each sentence position, this is in 1 specified.

In diesem Zusammenhang kann die folgende Wahrscheinlichkeit pm bestimmt werden: p m ( w i | w i 1 , m i 2,1 , m i 2,2 )

Figure DE102021006511A1_0004
In this context, the following probability p m can be determined: p m ( w i | w i 1 , m i 2.1 , m i 2.2 )
Figure DE102021006511A1_0004

Auch diese Wahrscheinlichkeit pm kann mit anderen, z.B. einer oder mehreren der vorstehend beschriebenen Wahrscheinlichkeiten in beschriebener Weise kombiniert oder verknüpft werden.This probability p m can also be combined or linked in the manner described with others, for example one or more of the above-described probabilities.

Bei der Verwendung der Wahrscheinlichkeit pm gilt, da jeweils die beiden seltensten Wörter für alle Wortpositionen im Satz miteinander kombiniert werden, dass sehr viele Tupel im Speicher abgelegt werden müssen.When using the probability p m , since the two rarest words for all word positions in the sentence are combined with one another, a large number of tuples have to be stored in the memory.

Gemäß einer bevorzugten Variante, die mit einem geringeren Speicherverbrauch auskommt, reicht es aus, lediglich die Wahrscheinlichkeit p m = j ( w i | w i 1 , m i 2, j )

Figure DE102021006511A1_0005
für verschiedene j zu bestimmen und dann diese einzelnen Wahrscheinlichkeiten zu kombinieren, über eine der vorstehend beschriebenen Operationen: p m ( w i | w i 1 , m i 2,1 , m i 2,2 ) p m ' ( w i | w i 1 ) = o p j { p m = j ( w i | w i 1 , m i 2, j ) }
Figure DE102021006511A1_0006
According to a preferred variant, which manages with a lower memory consumption, only the probability is sufficient p m = j ( w i | w i 1 , m i 2, j )
Figure DE102021006511A1_0005
for various j and then combine these individual probabilities, via one of the operations described above: p m ( w i | w i 1 , m i 2.1 , m i 2.2 ) p m ' ( w i | w i 1 ) = O p j { p m = j ( w i | w i 1 , m i 2, j ) }
Figure DE102021006511A1_0006

Allerdings bleiben auch gemäß den vorstehend beschriebenen Ansätzen noch ungelöste Aspekte.However, even according to the approaches described above, there are still unsolved aspects.

Denn Sprache dient nicht zur Wiedergabe von zuvor gesagtem, sondern soll z.B. auch einen aktuellen Zustand des Sprechers abbilden. Dies lässt sich mit den bislang bekannten Ansätzen nicht erreichen.Because language is not used to reproduce what has been said before, but should also depict a current state of the speaker, for example. This cannot be achieved with the previously known approaches.

Aufgabe der vorliegenden Erfindung ist es, ein Verfahren und eine Vorrichtung zum maschinellen Verarbeiten von Texten vorzuschlagen, welche den vorstehend erläuterten Nachteilen Rechnung tragen.The object of the present invention is to propose a method and a device for machine processing of texts which take account of the disadvantages explained above.

Diese Aufgabe wird durch ein Verfahren und eine Vorrichtung mit den Merkmalen der unabhängigen Ansprüche gelöst. Vorteilhafte Ausgestaltungen und Weiterbildungen sind in den abhängigen Ansprüchen angegeben.This object is achieved by a method and a device having the features of the independent claims. Advantageous refinements and developments are specified in the dependent claims.

Zusammenfassung der ErfindungSummary of the Invention

Ein Grundkonzept, auf welchem die vorliegende Erfindung aufgebaut wird, besteht darin, Wörtern des Textkorpus zunächst jeweils einen Wert zuzuordnen.A basic concept on which the present invention is built is to first assign a value to each word of the text corpus.

Ein solcher Wert, der z.B. durch einen ein- oder mehrdimensionaler Vektor repräsentiert sein kann, dient dazu, das jeweilige Wort nach vorgegebenen Kriterien zu klassifizieren oder zu bewerten.Such a value, which can be represented by a one- or multi-dimensional vector, for example, is used to classify or evaluate the respective word according to specified criteria.

Grundsätzlich kann hier jede anwendungsbezogen als sinnvoll angesehene Klassifikation oder Bewertung verwendet werden. Insbesondere empirisch abgeleitete Bewertungen können verwendet werden.In principle, any application-related classification or evaluation that is considered meaningful can be used here. In particular, empirically derived ratings can be used.

Eine im Zusammenhang mit der maschinellen Verarbeitung von natürlicher Sprache aus der Literatur bekannte Klassifikation ist die so genannte VAD-Klassifikation (vgl. S. M. Mohammad, „Obtaining reliable human ratings of valence, arousal, and dominance for 20,000 english words“, in Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1), Melbourne, Australia. Stroudsburg, PA: The Association for Computational Linguistics, July 2012, pp. 174-184).A classification known from the literature in connection with the machine processing of natural language is the so-called VAD classification (cf. S. M. Mohammad, "Obtaining reliable human ratings of valence, arousal, and dominance for 20,000 english words", in Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1), Melbourne, Australia Stroudsburg, PA: The Association for Computational Linguistics, July 2012, pp. 174-184).

VAD steht dabei für Valence (Valenz), Arousal (Erregung), und Dominance (Dominanz). Hierbei werden Worte also anhand primärer emotionaler Komponenten klassifiziert.VAD stands for Valence, Arousal, and Dominance. Here, words are classified based on primary emotional components.

Basierend auf einer solchen Bewertung oder Klassifikation kann dann für ein Wort im Textkörper eine Wahrscheinlichkeit dafür bestimmt werden, dass dieses Wort in einem bestimmten Zusammenhang, also z.B. in einem bestimmten Satz, in Kombination mit einem bestimmten Zustand erscheint. Dieser bestimmte Zustand wiederum bestimmt sich in vorgegebener Weise aus den Werten von zu dem Wort im Text benachbarten Worten.Based on such an evaluation or classification, a probability can then be determined for a word in the text body that this word appears in a specific context, e.g. in a specific sentence, in combination with a specific state. This specific state in turn is determined in a predetermined manner from the values of words adjacent to the word in the text.

Der Begriff „benachbart“ ist hier eher weit zu verstehen im Sinne von „innerhalb einer gewissen Distanz“, also z.B. innerhalb eines gewissen Wortabstands. Insbesondere bedeutet benachbart nicht notwendigerweise „unmittelbar benachbart“ oder „direkt benachbart“. Wir groß der Abstand sein kann, z.B. „höchstens fünf Worte“ oder „höchstens zehn Worte“, oder „innerhalb eines Satzes“, oder „innerhalb eines Absatzes“, kann anwendungsbedingt variieren.The term "neighboring" is to be understood here rather broadly in the sense of "within a certain distance", e.g. within a certain word spacing. In particular, adjacent does not necessarily mean "immediately adjacent" or "directly adjacent". How big the distance can be, e.g. "maximum five words" or "maximum ten words", or "within a sentence", or "within a paragraph", can vary depending on the application.

Es wird also zunächst ein Zustand bestimmt oder errechnet über eine Menge von Wörtern, die sich im Text in der Umgebung des infrage stehenden Wortes befinden, beispielsweise über solche Wörter, die in dem betreffenden Satz in Leserichtung vor dem infrage stehenden Wort angeordnet sind. Der Zustand wird dann bestimmt auf Basis der diesen Wörtern zugeordneten Werte, indem dieser Werte beispielsweise addiert (und dann gegebenenfalls skaliert) werden. Der Zustand nimmt vorzugsweise einen skalaren Wert an. Grundsätzlich ist es aber auch möglich, den Zustand vektorwertig zu definieren.A state is first determined or calculated using a set of words that are in the text in the vicinity of the word in question, for example those words that are arranged in the relevant sentence in the reading direction in front of the word in question. The state is then determined based on the values associated with these words, for example by adding (and then scaling if necessary) these values. The state preferably takes on a scalar value. In principle, however, it is also possible to define the state as a vector.

Die Berechnung des Zustandes kann auch auf andere Weise, z.B. durch Multiplikation erreicht werden. In diesem Fall wären Vektorkomponenten von vektorwertige repräsentierten Werten zunächst durch z.B. eine Exponentialfunktion zu transformieren. Andere Formen der Berechnung des Zustandes auf Basis der Werte der benachbarten Worte sind möglich, und die nachstehend exemplarisch angegebenen Beispiele sind nicht limitierend zu verstehen, sondern erläuternd.The state can also be calculated in other ways, for example by multiplication. In this case, vector components of vector-valued represented values would first have to be transformed by, for example, an exponential function. Other forms of calculating the state on the basis of the values of the neighboring words are possible and the examples given below are not to be considered as limiting but as illustrative.

Mittels des Zustandes kann quasi die Bewertung, die zunächst nur wortweise vorliegt, auf eine Textpassage, wie z.B. eine Sequenz von Worten, ein oder mehrere Sätze, etc. ausgedehnt werden. Der Zustand gibt somit eine Art inneren Kontext oder eine Situation wieder, in dem oder der das infrage stehende Wort im Text steht, wobei der Kontext oder die Situation von der Art der Bewertung der einzelnen Worte abhängt.By means of the status, the evaluation, which is initially only available word by word, can be extended to a text passage, such as a sequence of words, one or more sentences, etc. The state thus reflects some kind of internal context or situation in which the word in question is found in the text, the context or situation depending on the way in which the individual words are evaluated.

Die für das infrage stehende Wort bestimmte erste Wahrscheinlichkeit gibt dann an, wie wahrscheinlich es ist, dass das infrage stehende Wort in dem Text in Kombination mit dem bestimmten Zustand, erscheint.The first probability determined for the word in question then indicates how likely it is that the word in question appears in the text in combination with the determined condition.

Dabei wird diese erste Wahrscheinlichkeit vorzugsweise auf Basis des Wertes des infrage stehenden Wortes selbst im Vergleich zu dem Zustand berechnet.In doing so, this first probability is preferably calculated on the basis of the value of the word in question itself compared to the state.

Die erste Wahrscheinlichkeit wird für den Zustand bzw. in Abhängigkeit von dem Zustand berechnet. Der Zustand ergibt sich, wie vorstehend erläutert, beispielsweise durch Abbildung einer Summe der die Werte der benachbarten Worte repräsentierenden Vektoren auf einen diskreten Wert. Für die Art der Abbildung gibt es wiederum verschiedene Möglichkeiten. Eine solche Möglichkeit besteht darin, den Raum, in dem die Vektoren definiert sind, räumlich zu unterteilen, z.B. in Voxel. Eine Vektorsumme, die dann ebenfalls als Vektor im betreffenden Raum angesehen werden kann, kann dann danach bewertet werden, in welchem der Voxel diese angeordnet ist. Die Voxel können dazu geeignet sortiert oder nummeriert werden, wodurch jedem Voxel in eindeutiger Weise ein Zustand, entsprechend der Nummerierung, zugeordnet ist.The first probability is calculated for the state or as a function of the state. As explained above, the state results, for example, by mapping a sum of the vectors representing the values of the adjacent words onto a discrete value. There are again various possibilities for the type of mapping. One such possibility is to spatially subdivide the space in which the vectors are defined, e.g., into voxels. A vector sum, which can then also be regarded as a vector in the relevant space, can then be evaluated according to the voxel in which it is arranged. For this purpose, the voxels can be suitably sorted or numbered, as a result of which each voxel is unambiguously assigned a state corresponding to the numbering.

Folglich umfasst eine bevorzugte Ausführungsform eines Verfahrens zum maschinellen Verarbeiten eines Textes folgende die Schritte:

  • Ein Text wird erfasst und gespeichert, wobei jedem erfassten Wort ein Wert zugeordnet wird. Dieser Wert kann dann zu dem Wort oder einem dem Wort zugeordneten Index gespeichert werden.
Accordingly, a preferred embodiment of a method for processing a text comprises the following steps:
  • Text is captured and stored, with each captured word being assigned a value. This value can then be stored with the word or an index associated with the word.

Dann wird für eine Sequenz von Wörtern des Textes, z.B. für einen Satz, und für ein Wort der Sequenz eine erste Wahrscheinlichkeit bestimmt.A first probability is then determined for a sequence of words in the text, e.g., for a sentence, and for a word in the sequence.

Diese erste Wahrscheinlichkeit gibt eine Wahrscheinlichkeit an, mit der das Wort in der Sequenz in Kombination mit einem bestimmten Zustand vorkommt. Dieser Zustand berechnet sich aus den Werten von in der Sequenz zu dem Wort benachbarten Worten. Die Sequenz muss nicht notwendigerweise nur aufeinanderfolgende Wörter enthalten.This first probability gives a probability with which the word occurs in the sequence in combination with a certain state. This state is calculated from the values of words adjacent to the word in the sequence. The sequence does not necessarily have to contain only consecutive words.

Der Wert eines Wortes kann z.B. durch einen ein- oder mehrdimensionalen Vektor repräsentiert werden.For example, the value of a word can be represented by a one- or multi-dimensional vector.

Der mit Bezug zu den benachbarten Worten berechnete Zustand kann dann z.B. mittels Addition der den benachbarten Worten zugeordneten Werte berechnet werden. Gegebenenfalls kann noch eine geeignete Skalierung erfolgen, z.B. indem das Resultat der Addition durch die Anzahl der Summanden geteilt wird. Wie erwähnt, kann der Zustand vektorwertige definiert sein. Vorzugsweise wird der Zustand aber als skalarer Wert, d.h. z.B. als natürliche oder reelle Zahl definiert.The state calculated in relation to the neighboring words can then be calculated, for example, by adding the values assigned to the neighboring words. If necessary, a suitable scaling can also be carried out, e.g. by dividing the result of the addition by the number of summands. As mentioned, the state can be defined as vector-valued. However, the state is preferably defined as a scalar value, i.e. for example as a natural or real number.

Auf diese Weise kann z.B. in dem Fall, dass ein einem Wort zugeordneter Wert durch einen 3-dimensionalen Vektor gegeben ist (wie bei der VAD-Klassifikation), dessen Einträge jeweils Werte im Intervall [0, 1] einnehmen, als Zustand ebenfalls ein 3-dimensionaler Vektor mit Werten im gleichen Intervall erhalten werden, wie dies im Folgenden an einem einfachen Beispiel gezeigt wird.In this way, for example, if a value assigned to a word is given by a 3-dimensional vector (as in the VAD classification) whose entries each have values in the interval [0, 1], the state can also be a 3 -dimensional vector with values in the same interval can be obtained, as shown in a simple example below.

Gegeben sei die Textsequenz „Mir geht es ...“. Die Worte darin seien jeweils wie folgt bewertet: W e r t ( " m i r " ) = { 0,1 0,5 0,7 } ;   W e r t ( " g e h t " ) = { 0,7 0,7 0,6 } ,   W e r t ( " e s " ) = { 0,3 0,6 0,2 }

Figure DE102021006511A1_0007
The text sequence "I'm fine..." is given. The words in it are rated as follows: W e right t ( " m i right " ) = { 0.1 0.5 0.7 } ; W e right t ( " G e H t " ) = { 0.7 0.7 0.6 } , W e right t ( " e s " ) = { 0.3 0.6 0.2 }
Figure DE102021006511A1_0007

Wie diese Bewertung zustande kommt, und wie diese dann semantisch ausgewertet wird, spielt für den Grundgedanken der Erfindung zunächst keine entscheidende Rolle. Der Vektor kann dann in einen Richtungsvektor konvertiert werden. Andere Arten der Normierung oder Skalierung sind möglich.How this evaluation comes about and how it is then evaluated semantically does not initially play a decisive role for the basic idea of the invention. The vector can then be converted to a direction vector. Other types of normalization or scaling are possible.

Im obigen Beispiel würde der Vektor [0.5,0.5,0.5] subtrahiert werden, so dass wir positive und negative Werte in den Komponenten erhalten. Anschließend wird der Vektor auf eine Einheitslänge normalisiert. Wir erhalten: v ( " m i r " ) = { 0,89 0 0,45 } ;   v ( " g e h t " ) = { 0,67 0,67 0,33 } ,   v ( " e s " ) = { 0,53 0,27 0,80 }

Figure DE102021006511A1_0008
In the example above, the vector [0.5,0.5,0.5] would be subtracted, giving us positive and negative values in the components. Then the vector is normalized to a unit length. We obtain: v ( " m i right " ) = { 0.89 0 0.45 } ; v ( " G e H t " ) = { 0.67 0.67 0.33 } , v ( " e s " ) = { 0.53 0.27 0.80 }
Figure DE102021006511A1_0008

Dann errechnet sich ein Zustand mit Bezug zu dieser Textsequenz beispielsweise mittels Addition wie folgt: Z u s t a n d ( " M i r   g e h t   e s " ) = { 0,89 0 0,45 } + { 0,67 0,67 0,33 } + { 0,53 0,27 0,80 } = { 0,75 0,94 0,02 }

Figure DE102021006511A1_0009
A state with reference to this text sequence is then calculated, for example, by means of addition as follows: Z and s t a n i.e ( " M i right G e H t e s " ) = { 0.89 0 0.45 } + { 0.67 0.67 0.33 } + { 0.53 0.27 0.80 } = { 0.75 0.94 0.02 }
Figure DE102021006511A1_0009

Ein so definierter Zustand wäre vektorwertig. Zum Berechnen der ersten Wahrscheinlichkeit könnte dieser Zustand dann in geeigneter Weise für die Berechnung der Wahrscheinlichkeit eines Folgewortes verwendet werden.A state defined in this way would be vector-valued. To calculate the first probability, this state could then suitably be used to calculate the probability of a subsequent word.

Gemäß einer bevorzugten Ausführungsform soll, ausgehend von dem vektorwertigen Zwischenzustand ein diskreter Zustand berechnet werden, wie dies nachfolgend erläutert wird:

  • Wenn wir nun den Raum in 3x3x3 Voxel mit Seitenlänge 1 unterteilen, können wir bestimmen, in welchem der verschiedenen Voxel der vektorwertige Zwischenzustand liegt. Im vorliegenden Beispiel entspricht der Vektor [-0.75,0.94,-0.02] dem Voxel [-1,1,0] aus der Menge der Voxel ([-1,-1,-1],... ,[0,0,0],... ,[1,1,1]).
According to a preferred embodiment, starting from the vector-valued intermediate state, a discrete state is to be calculated, as explained below:
  • If we now subdivide the space into 3x3x3 voxels with side length 1, we can determine in which of the different voxels the vector-valued intermediate state lies. In the present example, the vector [-0.75,0.94,-0.02] corresponds to the voxel [-1,1,0] from the set of voxels ([-1,-1,-1],... ,[0,0 ,0],... ,[1,1,1]).

Die Voxel können z.B. geeignet sortiert oder nummeriert werden, so dass z.B. jedem Voxel eine eindeutige Nummer, zwischen 0 und 26, zugeordnet ist. Das hier infrage stehende Voxel [-1, 1, 0] habe z.B. die Nummer 5. Wir identifizieren daher den diskreten Zustand z=5.The voxels can, for example, be suitably sorted or numbered so that, for example, each voxel is assigned a unique number between 0 and 26. For example, the voxel in question [-1, 1, 0] has the number 5. We therefore identify the discrete state z=5.

Soll nun eine erste Wahrscheinlichkeit bestimmt werden, dass das Wort „gut“ im Text in der vorstehenden Textpassage vorkommt („Mir geht es gut“), so zählen wir, wie oft das Wort „gut“ im Textkorpus auf das Wort „es“ im Zustand z=5 folgt.If a first probability is to be determined that the word "good" occurs in the text in the preceding text passage ("I'm fine"), we count how often the word "good" in the text corpus matches the word "it" in the text State z=5 follows.

Wir erhalten somit die Wahrscheinlichkeit pz=5(„gut"|„es") und können diese Wahrscheinlichkeit wie auch die anderen oben genannten Wahrscheinlichkeiten in Kombination mit dem errechneten Zustand verwenden, um einen Satz zu expandieren, d.h. ein weiteres Wort zu diesem Satz hinzuzufügen.We thus get the probability p z=5 ("good"|"it") and can use this probability as well as the other above-mentioned probabilities in combination with the calculated state to expand a sentence, ie add another word to this sentence to add.

Wie das vorstehende Beispiel zeigt, ist der Vektor, der den Wert eines Wortes repräsentiert, ein k-dimensionaler Vektor ist, wobei k eine natürliche Zahl ist. Die einzelnen Werte, die mit den Worten des Satzes assoziiert sind, ergeben bei Addition einen Pfad im k-dimensionalen Raum. Der Schlußpunkt dieses Pfades wird verwendet, um den Zustand zu definieren.As the example above shows, the vector representing the value of a word is a k-dimensional vector, where k is a natural number. The individual values associated with the words of the sentence, when added together, result in a path in k-dimensional space. The endpoint of this path is used to define the state.

Hierzu wird der Vektorraum um den Ausgangspunkt diskretisiert, z.B. indem der Raum, wie beschrieben, in einzelne Voxel unterteilt wird. Jede Komponente des Vektors, der aufgrund der Bewertungen der Worte des bisherigen Satzes ermittelt wurde, kann einer von zumindest b diskrete Werte annehmen, wobei b ebenfalls eine natürliche Zahl ist. Ein k-dimensionaler Vektor mit jeweils b diskreten Einträgen ließe dann bk verschiedene Zustände zu.To this end, the vector space around the starting point is discretized, for example by subdividing the space into individual voxels, as described. Each component of the vector, which was determined based on the ratings of the words of the previous sentence, can assume one of at least b discrete values, where b is also a natural number. A k-dimensional vector, each with b discrete entries, would then permit b k different states.

Wie bereits erwähnt, kann ein den Wert repräsentierender Vektor eine Beschreibung des Wortes gemäß der so genannten VAD-Klassifikation umfassen.As already mentioned, a vector representing the value can contain a description of the word according to the so-called VAD classification.

Auf der anderen Seite kann es sinnvoll sein, für zumindest eine Teilmenge des Textkorpus ein alternatives Bewertungsschema zu verwenden, denn z.B. VDA-Bewertungen liegen in der Regel nur für eine Teilmenge aller im Textkorpus vorkommender Wörter vor.On the other hand, it can make sense to use an alternative rating scheme for at least a subset of the text corpus, because VDA ratings, for example, are usually only available for a subset of all words occurring in the text corpus.

Auf diese Weise kann sichergestellt werden, dass jedem Wort des Textkorpus in eindeutiger Weise ein Wert zugeordnet wird.In this way it can be ensured that each word of the text corpus is assigned a value in an unambiguous manner.

Ein Beispiel für ein alternatives Bewertungsschema ergibt sich daraus, dass man einem Wort einen zufälligen Vektor einer entsprechenden Dimension zuordnet, also einen Vektor, dessen Einträge beispielsweise (Pseudo)-Zufallszahlen sind, z.B. im Intervall [0, 1].An example of an alternative evaluation scheme results from assigning a random vector of a corresponding dimension to a word, i.e. a vector whose entries are, for example, (pseudo)random numbers, e.g. in the interval [0, 1].

Ganz grundsätzlich können verschiedene Bewertungsschemata geeignet kombiniert werden. Damit erhalten wir für jedes Bewertungsschema einen anderen Zustand. Je mehr verschiedene Zustände, desto klarer lässt sich die Antwort eingrenzen.In principle, different evaluation schemes can be suitably combined. This gives us a different status for each evaluation scheme. The more different states, the clearer the answer can be narrowed down.

Beispiel: Für Bewertungsschema A erhalten wir für den Satz „mir geht es“ den Zustand 5 und mögliche Folgewörter: „gut“, „nicht“. Unter möglichen Folgewörtern werden hier solche Worte des Textkorpus verstanden, die mit vergleichsweise hoher erster Wahrscheinlichkeit im angegebenen Zustand auf den angegebenen Satzanfang folgen.Example: For evaluation scheme A we get the condition 5 for the sentence "I'm fine" and possible follow-up words: "good", "not". Possible following words are understood here to be words of the text corpus that follow the specified beginning of the sentence with a comparatively high first probability in the specified state.

Für Bewertungsschema B erhalten wir für den Satz „mir geht es“ den Zustand 11 und hier die möglichen Folgewörter: „gut“, „schlecht“.For evaluation scheme B we get the state 11 for the sentence "I'm fine" and here the possible follow-up words: "good", "bad".

Für die Kombination von Bewertungsschema A mit Zustand 5 und Bewertungsschema B mit Zustand 11 ist somit nur das Folgewort „gut“ möglich.For the combination of evaluation scheme A with status 5 and evaluation scheme B with status 11, only the subsequent word "good" is possible.

Die Wahl von zufälligen Bewertungsschemata hat dabei den Vorteil, dass beliebig viele dieser Bewertungsschemata erzeugt werden können.The choice of random evaluation schemes has the advantage that any number of these evaluation schemes can be generated.

Eine Klasse von Wörtern, beispielsweise solche, die als diejenigen angesehen werden, die einen Großteil der Bedeutung eines Textes tragen, können auf eine erste Weise bewertet werden, und semantisch weniger wichtige Bestandteile des Textes, wie z.B. Füllwörter oder Satzzeichen, können auf eine anderen Weise bewertet werden.A class of words, for example those considered to carry most of the meaning of a text, can be evaluated in a first way, and semantically less important components of the text, such as filler words or punctuation marks, can be evaluated in a different way be rated.

Um eine Bestimmung des Zustandes zu erleichtern und zu vereinheitlichen, ist es vorteilhaft, wenn die jeweiligen Bewertungsschemata formal kompatibel sind, wie z.B. VAD-Vektoren und 3-dimensionale Zufallsvektoren mit Einträgen in [0, 1].In order to facilitate and standardize a determination of the state, it is advantageous if the respective evaluation schemes are formally compatible, such as VAD vectors and 3-dimensional random vectors with entries in [0, 1].

Wie bereits erwähnt, kann die Sequenz, die zusammen mit dem infrage stehenden Wort betrachtet wird, einen oder mehrere Sätze des Textes umfassen. Die benachbarten Worte können in der Sequenz in Leserichtung vor oder nach dem infrage stehenden Wort angeordnet sein, dabei können auch einzelne Worte ausgelassen werden, beispielsweise solche mit hoher relativer Häufigkeit (und geringer semantischer Bedeutung).As already mentioned, the sequence considered together with the word in question can comprise one or more sentences of the text. The adjacent words may appear in the sequence in the reading direction before or after the word in question, or individual words may be omitted, such as those of high relative frequency (and low semantic importance).

Die „erste Wahrscheinlichkeit“ ergänzt bzw. erweitert die Wahrscheinlichkeiten pn□ und pΔt' die eingangs beschrieben worden sind.The "first probability" supplements or expands the probabilities p n □ and p Δt' that were described at the beginning.

Wie eingangs beschrieben, hat der Erfinder schon früher erkannt, dass verschiedene Wahrscheinlichkeiten kombiniert werden können, wenn es darum geht, eine Einschätzung darüber zu treffen, wie wahrscheinlich ein Wort in einem Text an eine bestimmten Stelle, z.B. in einem bestimmten Satz, vorkommt.As described at the outset, the inventor recognized earlier that different probabilities can be combined when it comes to estimating how likely it is that a word in a text will occur at a specific point, e.g. in a specific sentence.

Eine dieser Wahrscheinlichkeiten ist die mit Bezug zur vorliegenden Erfindung vorstehend beschriebene „erste Wahrscheinlichkeit“. Weitere Wahrscheinlichkeiten, die mit dieser „ersten Wahrscheinlichkeit“ kombiniert werden können, hat der Erfinder im Zusammenhang mit der DE 10 2016 125 162 B4 bereits beschrieben.One of these probabilities is the “first probability” described above in relation to the present invention. The inventor has other probabilities that can be combined with this “first probability” in connection with the DE 10 2016 125 162 B4 already described.

Der Vollständigkeit halber werden einzelne davon nachfolgend nochmals knapp erläutert mit Bezug zu einer Terminologie, die sich dann auch in den abhängigen Ansprüchen findet.For the sake of completeness, some of them are briefly explained again below with reference to a terminology that is then also found in the dependent claims.

Nachdem der Text erfasst und gespeichert ist, kann für jedes erfasste Wort ein Häufigkeitswert bestimmt und gespeichert, welcher repräsentiert, wie häufig dieses Wort in dem Text im Vergleich zu anderen Wörtern des Textes vorkommt.After the text has been recorded and stored, a frequency value can be determined and stored for each recorded word, which represents how often this word occurs in the text compared to other words in the text.

Zu diesem Zweck kann beispielsweise eine absolute Häufigkeit, mit der das Wort in dem Text vorkommt, bestimmt oder gespeichert werden, oder eine relative Häufigkeit, oder eine Nummer oder ein Index des Wortes gemäß einer Sortierung nach der Häufigkeit des Auftretens. Anhand des Häufigkeitswertes muss es lediglich möglich sein, zwei Wörter des Textes hinsichtlich der Häufigkeit, mit der diese Wörter im Text vorkommen, zu vergleichen.For this purpose, for example, an absolute frequency with which the word occurs in the text can be determined or stored, or a relative frequency, or a number or an index of the word according to a sorting according to the frequency of occurrence. Based on the frequency value, it must only be possible to compare two words in the text with regard to the frequency with which these words occur in the text.

Für zumindest einen Satz des Textes und für zumindest ein Wort des Satzes kann dann implizit oder explizit eine zweite Wahrscheinlichkeit bestimmt und gespeichert werden, mit der dieses Wort in dem Satz in Kombination mit einem nachstehend genauer definierten ersten Tupel von Wörtern vorkommt. Als Tupel wird im vorliegenden Zusammenhang eine geordnete Menge verstanden, d.h. die Reihenfolge der Elemente und deren Vielfachheit sind zu beachten.For at least one sentence of the text and for at least one word of the sentence, a second probability can then be determined and stored implicitly or explicitly, with which this word occurs in the sentence in combination with a first tuple of words, defined more precisely below. In the present context, a tuple is understood to be an ordered set, i.e. the order of the elements and their multiplicity must be observed.

Das erste Tupel umfasst zumindest zwei Wörter des Satzes, welche beim wortweisen, linearen Durchlaufen des Satzes vor dem Wort angeordnet sind. Das Durchlaufen des Satzes kann dabei in herkömmlicher Leserichtung, d.h. von links nach rechts, oder auch entgegen der Leserichtung, von rechts nach links, erfolgen.The first tuple comprises at least two words of the sentence, which are arranged in front of the word when the sentence is traversed word-by-word, linearly. The sentence can be read in the usual reading direction, i.e. from left to right, or in the opposite reading direction, from right to left.

Zumindest ein erstes der zumindest zwei Wörter des ersten Tupels tritt im Vergleich zu anderen in dem Satz bereits durchlaufenen Wörtern in dem Text mit geringerer Häufigkeit auf.At least a first of the at least two words of the first tuple occurs with a lower frequency in the text compared to other words already traversed in the sentence.

Weiterhin gilt, dass zumindest ein zweites der zumindest zwei Wörter des ersten Tupels in dem Satz in einer vorgegebenen Umgebung des Wortes angeordnet ist.Furthermore, it applies that at least a second of the at least two words of the first tuple in the sentence is arranged in a predetermined vicinity of the word.

Die oben angegebenen Eigenschaften sollen zum besseren Verständnis an einem einfachen abstrakten Beispiel verdeutlicht werden:

  • Der infrage stehende Satz bestehe aus der Wort-Sequenz w1, w2, ..., w10 (wobei wi jeweils einen Index des entsprechenden Wortes bezeichnet), das aktuell betrachtete Wort sei das Wort w7, d.h. die Wörter w1 bis w6 seien bereits durchlaufen (in Leserichtung). Das Wort w2 sei dasjenige Wort, welches in dem Text im Vergleich zu den weiteren in dem Satz bereits durchlaufenen Wörtern (w1 bis w6) mit der geringsten Häufigkeit vorkommen soll. Das Wort w6 steht in Durchlaufrichtung unmittelbar vor dem Wort w7.
For better understanding, the properties specified above should be illustrated using a simple, abstract example:
  • The sentence in question consists of the word sequence w 1 , w 2 , ..., w 10 (where w i denotes an index of the corresponding word), the currently considered word is the word w 7 , ie the words w 1 up to w 6 have already been run through (in the direction of reading). The word w 2 is the word that is to occur in the text with the lowest frequency compared to the other words (w 1 to w 6 ) already run through in the sentence. Word w 6 immediately precedes word w 7 in the direction of flow.

Das erste Tupel setzt sich dann z.B. aus den zwei Wörtern w2 und w6 zusammen: (w2, w6). Mit anderen Worten entspricht das „zumindest eine erste der zumindest zwei Wörter“ des ersten Tupels dem Wort w2. Das „zumindest eine zweite der zumindest zwei Wörter“ des ersten Tupels ist das Wort w6, da es in einer vorgegebenen Umgebung, im Beispiel direkt vorangehend, zu dem Wort w7 angeordnet ist.The first tuple then consists of the two words w 2 and w 6 , for example: (w 2 , w 6 ). In other words, the "at least a first of the at least two words" of the first tuple corresponds to the word w 2 . The “at least a second of the at least two words” of the first tuple is the word w 6 , since it is arranged in a predetermined environment, in the example directly preceding the word w 7 .

Die „zweite Wahrscheinlichkeit“, in dem Beispiel ein Wert p(w7l(w2, w6)),muss dabei nicht notwendigerweise als ein Wert zwischen 0 und 1 (wie eine Wahrscheinlichkeit im mathematischen Sinne) berechnet und gespeichert werden.The "second probability", in the example a value p(w 7 l(w 2 , w 6 )), does not necessarily have to be calculated and stored as a value between 0 and 1 (like a probability in the mathematical sense).

Wie bereits vorstehend erläutert, reicht es aus, wenn als „zweite Wahrscheinlichkeit“ ein Wert bestimmt wird, der es ermöglicht, die Häufigkeit des Auftretens einer betreffenden Konstellation, d.h. ein vorgegebenes erstes Tupel in Kombination mit dem in Frage stehenden Wort in einem Satz, mit der Häufigkeit des Auftretens entsprechender Konstellationen ((Tupel, Wort) im Satz) zu vergleichen.As already explained above, it is sufficient if a value is determined as the "second probability" which makes it possible to determine the frequency of occurrence of a relevant constellation, i.e. a given first tuple in combination with the word in question in a sentence to compare the frequency of occurrence of corresponding constellations ((tuple, word) in the sentence).

In der Regel wird dieser Schritt für alle Sätze des Textes und jeweils alle Worte eines Satzes durchgeführt. Eventuelle Ausnahmen, die sich am Satzanfang oder am Satzende aus technischen Gründen ergeben können, sollen vorerst unbeachtet bleiben.As a rule, this step is carried out for all sentences of the text and all words of a sentence. Any exceptions that may arise at the beginning or end of a sentence for technical reasons should be ignored for the time being.

Vorzugsweise werden auch Satzzeichen als Wörter des Textes angesehen. Ein „Satz“ umfasst in der Regel, aus technischen Gründen, als erstes „Wort“ auch das abschließende Satzzeichen, z.B. „.“, „!“ oder „?“, des vorhergehenden Satzes. Auf diese Weise kann der Beginn eines Satzes einfacher erkannt werden.Punctuation marks are also preferably regarded as words of the text. For technical reasons, a "sentence" usually includes the final punctuation mark, e.g. ".", "!" or "?", of the preceding sentence as the first "word". This makes it easier to recognize the beginning of a sentence.

Die Nützlichkeit der Verwendung der „zweiten Wahrscheinlichkeit“ beruht auf zwei grundlegenden Beobachtungen. Diese gelten dann auch für die nachfolgend noch beschriebene, systematisch der „zweiten Wahrscheinlichkeit“ sehr ähnliche „vierte Wahrscheinlichkeit“.The usefulness of using the "second probability" rests on two basic observations. These then also apply to the “fourth probability” described below, which is systematically very similar to the “second probability”.

Gemäß einer ersten Beobachtung hat es sich gezeigt, dass diejenigen Wörter eines Satzes zumeist die aussagekräftigsten sind, d.h. im Wesentlichen den Sinngehalt des Satzes transportieren, welche bezüglich einer Häufigkeit des Auftretens im Text gegenüber anderen Wörtern des Satzes deutlich zurückstehen. Mit anderen Worten, eher „seltene“ Wörter sind bezüglich des semantischen Gehalts eines Satzes wichtiger als häufig auftretende Wörter.According to a first observation, it has been shown that those words in a sentence are usually the most meaningful, i.e. they essentially convey the meaning of the sentence, which are clearly inferior to other words in the sentence in terms of frequency of occurrence in the text. In other words, rather “rare” words are more important than frequently occurring words in terms of the semantic content of a sentence.

Das zeigt bereits das Beispiel aus 1.The example already shows that 1 .

Die Wörter mit der geringsten Häufigkeit teilen mit, „worum es in dem Satz geht“. Im Beispiel würden die vier Wörter mit der kleinsten Häufigkeit den Satz „hoffe morgen Sonne scheint“ ergeben. Die Wörter mit der kleinsten Häufigkeit im Satz sind also besonders aussagekräftig. Interessanterweise würden die gleichen Wörter extrahiert werden, wenn es sich um den gleichen Satz in englischer Sprache handeln würde. Die Wörter mit den höchsten Häufigkeiten sind lediglich Füllwörter, die für einen grammatikalisch korrekten Satz notwendig sind, jedoch nicht wesentlich für das Verständnis des Gesagten sind.The words with the lowest frequency communicate “what the sentence is about”. In the example, the four words with the lowest frequency would result in the sentence "I hope the sun will shine tomorrow". The words with the lowest frequency in the sentence are therefore particularly meaningful. Interestingly, if it were the same sentence in English, the same words would be extracted. The words with the highest frequencies are just filler words that are necessary for a grammatically correct sentence but are not essential for understanding what is being said.

Als zweite wesentliche Beobachtung ist zu nennen, dass die relative Häufigkeit von Wörtern innerhalb eines Satzes im Wesentlichen konstant ist, sobald die verarbeitete Textbasis hinreichend groß wird.The second important observation is that the relative frequency of words within a sentence is essentially constant as soon as the processed text base becomes sufficiently large.

Diese beiden Beobachtungen sind mit der Definition der „zweiten Wahrscheinlichkeit“ verarbeitet worden:

  • Erstens können dadurch, dass das erste Tupel ein oder mehrere den Satz semantisch bestimmende Wörter umfasst, entsprechend dem „zumindest einen ersten Wort“ mit vergleichsweise geringer Häufigkeit, und dadurch, dass weniger wichtige Wörter (entsprechend Füllwörtern) mit hoher Häufigkeit ausgelassen werden, im Vergleich zum klassischen n-Gramm-Ansatz erhebliche Ressourcen, insbesondere Speicherplatz, eingespart werden. Das erste Tupel kann vergleichsweise „kurz“ gehalten werden und umfasst in der Regel z.B. zwei, drei oder vier Wörter. Trotzdem kann ähnlich viel Sinngehalt transportiert werden als in vergleichsweise langen n-Grammen.
These two observations have been processed with the definition of the "second probability":
  • Firstly, because the first tuple comprises one or more words that semantically determine the sentence, corresponding to the "at least one first word" with a comparatively low frequency, and because less important words (corresponding to filler words) are omitted with a high frequency, in comparison Considerable resources, especially storage space, can be saved compared to the classic n-gram approach. The first tuple can be kept comparatively "short" and usually comprises two, three or four words, for example. Nevertheless, a similar amount of meaning can be transported as in comparatively long n-grams.

Zweitens wird dadurch, dass das erste Tupel in Form des „zumindest einen zweiten Wortes“ zusätzlich zumindest ein Wort in vorgegebener Umgebung, vorzugsweise direkt oder beinahe direkt benachbart zu dem in Frage stehenden Wort umfasst, für welches die zweite Wahrscheinlichkeit bestimmt wird, sichergestellt, dass zumindest ein gewisser Zusammenhang zwischen dem Ende des aktuell bearbeiteten Satzfragments, d.h. dem Anteil des Satzes, an welches das Wort anschließt, und dem Teil des Satzes, welcher die sinntragenden Wörter umfasst, erhalten bleibt. Somit kann der grundlegende Nachteil des eingangs beschriebenen, aus dem älteren Stand der Technik bekannten Verfahrens, bei dem lediglich Wahrscheinlichkeiten mit Bezug zu einzelnen, „zeitlich“ im Satz zurückliegenden Wörtern separat bestimmt worden sind, erheblich abgemildert werden. Ein Zusammenhang zwischen Satzende und Satzanfang bleibt erfindungsgemäß auch für längere Sätze zumindest teilweise erhalten.Secondly, the fact that the first tuple in the form of "at least one second word" additionally includes at least one word in a predetermined environment, preferably directly or almost directly adjacent to the word in question, for which the second probability is determined, ensures that at least a certain connection between the end of the currently processed sentence fragment, i.e. the part of the sentence to which the word follows, and the part of the sentence that includes the meaningful words, is retained. In this way, the basic disadvantage of the method described at the outset, which is known from the older prior art and in which only probabilities relating to individual words “in the past” in the sentence were determined separately, can be significantly alleviated. According to the invention, a connection between the end of the sentence and the beginning of the sentence is at least partially retained, even for longer sentences.

Gemäß einer bevorzugten Ausführungsform umfasst das erste Tupel zumindest drei Wörter. Dabei treten zumindest zwei Wörter der zumindest drei Wörter im Vergleich zu allen anderen in dem Satz bereits durchlaufenen Wörtern in dem Text mit geringerer Häufigkeit auf.According to a preferred embodiment, the first tuple comprises at least three words. At least two of the at least three words occur in the text with a lower frequency than all the other words that have already been run through in the sentence.

Mit anderen Worten umfasst das erste Tupel gemäß dieser Ausführungsform zumindest zwei „sinntragende“ Wörter. Die Anzahl der „sinntragenden“ Wörter im ersten Tupel kann also variieren, beispielsweise abhängig von der Länge des aktuell betrachteten Satzes, von der grundsätzlichen Struktur des Textes, von der Position des Wortes in dem Satz, d.h. vom Anteil des Satzes, der bereits durchlaufen ist, oder dergleichen.In other words, according to this embodiment, the first tuple comprises at least two “meaningful” words. The number of "meaningful" words in the first tuple can vary, for example depending on the length of the sentence currently being considered, the basic structure of the text, the position of the word in the sentence, i.e. the part of the sentence that has already been run through , or similar.

Gemäß einer bevorzugten Variante der vorstehenden Ausführungsform sind die zumindest zwei „sinntragenden“ Wörter in dem ersten Tupel bezüglich der Häufigkeit, mit der diese Wörter im Text vorkommen, sortiert.According to a preferred variant of the above embodiment, the at least two “meaningful” words in the first tuple are sorted according to the frequency with which these words occur in the text.

Gemäß einer weiteren Ausführungsform wird nur ein einzelnes „sinntragendes“ Wort, bevorzugt das seltenste, verwendet und das zumindest eine zweite der zumindest zwei Wörter des ersten Tupels beim Durchlaufen des Satzes ist unmittelbar vor dem in Frage stehenden Wort angeordnet. Damit wird ein hinreichender Zusammenhang zum Ende des aktuell vorliegenden, d.h. bereits durchlaufenen Satzfragments hergestellt. Eine Distanz von z.B. ein oder zwei Wörtern ist hier jedoch auch akzeptabel.According to a further embodiment, only a single "meaningful" word, preferably the rarest, is used and the at least a second of the at least two words of the first tuple when traversing the sentence is located immediately before the word in question. With that, a sufficient connection to the end of the currently existing sentence fragment, ie the sentence fragment that has already been passed through. However, a distance of eg one or two words is also acceptable here.

Gemäß einer weiteren Ausführungsform kann, zusätzlich oder alternativ zu der zweiten Wahrscheinlichkeit, eine dritte Wahrscheinlichkeit bestimmt werden.According to a further embodiment, a third probability can be determined in addition or as an alternative to the second probability.

Dies erfolgt erneut, wie mit Bezug zu der zweiten Wahrscheinlichkeit beschrieben, auf Basis der bestimmten, die Häufigkeiten repräsentierenden Werte. Die dritte Wahrscheinlichkeit gibt eine Wahrscheinlichkeit an, mit der das Wort beim Durchlaufen des Satzes auf eine Sequenz von aufeinanderfolgenden Wörtern folgt, die durch eine vorgegebene Anzahl von dem Wort vorzugsweise unmittelbar vorhergehenden Wörtern bestimmt ist. Diese Sequenz von Wörtern kann ganz oder teilweise Teil des Satzes sein, aber auch mit angrenzenden Sätzen überlappen. D.h. die dritte Wahrscheinlichkeit kann satzübergreifend verstanden werden, mit Bezug auf eine vorgegebene Sequenz von Wörtern, wohingegen die zweite Wahrscheinlichkeit in der Regel auf den jeweiligen Satz beschränkt ist. D.h. das erste Tupel wird stets für einen vorgegebenen Satz gebildet, nicht über Satzgrenzen hinweg.This is done again, as described with reference to the second probability, on the basis of the determined values representing the frequencies. The third probability indicates a probability with which the word follows a sequence of consecutive words when running through the sentence, which is determined by a predetermined number of words preferably immediately preceding the word. This sequence of words may be part or all of the sentence, but may also overlap with adjacent sentences. I.e. the third probability can be understood across sentences, with reference to a given sequence of words, whereas the second probability is usually limited to the respective sentence. This means that the first tuple is always formed for a given sentence, not across sentence boundaries.

Mit Bezug auf das oben angegebene Beispiel (der in Frage stehende Satz bestehe aus der Wort-Sequenz w1, w2, ... , w10, das aktuell betrachtete Wort sei das Wort w7) würde als dritte Wahrscheinlichkeit, für eine vorgegebene Anzahl drei, z.B. die dritte Wahrscheinlichkeit p(w7|w4, w5, w6) bestimmt werden, d.h. die Wahrscheinlichkeit, dass das Wort w7 auf eine 3-er-Sequenz von Wörtern w4, w5, w6 folgt.With reference to the example given above (the sentence in question consists of the word sequence w 1 , w 2 , ... , w 10 , the currently considered word is the word w 7 ), as a third probability, for a given Number three, e.g. the third probability p(w 7 |w 4 , w 5 , w 6 ) can be determined, ie the probability that the word w 7 corresponds to a sequence of 3 words w 4 , w 5 , w 6 follows.

Gemäß einer weiteren Ausführungsform kann alternativ oder zusätzlich zu der dritten Wahrscheinlichkeit eine vierte Wahrscheinlichkeit für das in Frage stehende Wort bestimmt und gespeichert werden. Diese vierte Wahrscheinlichkeit wird analog zur zweiten Wahrscheinlichkeit bestimmt, d.h. es wird eine Wahrscheinlichkeit bestimmt, mit der das Wort in dem Satz in Kombination mit nun einem zweiten Tupel von Wörtern vorkommt. Das zweite Tupel umfasst, wie das erste Tupel, zumindest zwei Wörter, welche beim Durchlaufen des Satzes vor dem Wort angeordnet sind. Zumindest ein erstes der zumindest zwei Wörter des zweiten Tupels tritt im Vergleich zu anderen in dem Satz bereits durchlaufenen Wörtern in dem Text mit geringerer Häufigkeit auf. Zumindest ein zweites der zumindest zwei Wörter des zweiten Tupels ist in dem Satz in einer vorgegebenen Umgebung des Wortes angeordnet.According to a further embodiment, as an alternative or in addition to the third probability, a fourth probability can be determined and stored for the word in question. This fourth probability is determined analogously to the second probability, i.e. a probability is determined with which the word occurs in the sentence in combination with a second tuple of words. Like the first tuple, the second tuple comprises at least two words which are arranged before the word when the sentence is traversed. At least a first of the at least two words of the second tuple occurs with a lower frequency in the text compared to other words already traversed in the sentence. At least a second of the at least two words of the second tuple is located in the sentence in a predetermined neighborhood of the word.

Das zweite Tupel unterscheidet sich von dem ersten Tupel bezüglich der Definition des zumindest einen ersten Wortes, bezüglich der Definition des zumindest einen zweiten Wortes, oder bezüglich der Definition sowohl des zumindest einen ersten Wortes als auch des zumindest einen zweiten Wortes.The second tuple differs from the first tuple with regard to the definition of the at least one first word, with regard to the definition of the at least one second word, or with regard to the definition of both the at least one first word and the at least one second word.

Das erste Tupel könnte beispielsweise als „das zumindest eine erste Wort“ das Wort im der geringsten Häufigkeit umfassen, wobei das zweite Tupel an dieser Stelle das Wort mit der zweitgeringsten Häufigkeit umfassen kann. Analog kann eine Unterscheidung des „zumindest einen zweiten Wortes“ erfolgen, auf Basis einer jeweils vorgegebenen Umgebung, d.h. insbesondere bezüglich eines Abstandes zu dem in Frage stehenden Wort.For example, the first tuple could include the word with the lowest frequency as “the at least one first word”, wherein the second tuple can include the word with the second lowest frequency at this point. Analogously, a distinction can be made between “at least one second word” on the basis of a given environment, i.e. in particular with regard to a distance from the word in question.

Der Satz kann zum Bestimmen der ersten Wahrscheinlichkeit, der zweiten Wahrscheinlichkeit, der dritten Wahrscheinlichkeit oder der vierten Wahrscheinlichkeit in konventioneller Leserichtung, von links nach rechts, durchlaufen werden. Alternativ kann die umgekehrte Durchlaufrichtung gewählt werden, entgegen der Leserichtung, von rechts nach links. Schließlich ist es möglich, und bevorzugt, dass die jeweiligen Wahrscheinlichkeiten für beide Durchlaufrichtungen jeweils separat bestimmt und gespeichert werden. Dies hat den Vorteil, dass ein nachfolgend zu erzeugenden Satz, ausgehend von einem beliebigen Startwort aus dem Text, auf einfache Weise in beide Richtungen erweitert oder ergänzt werden kann.The sentence can be traversed in the conventional reading order, left to right, to determine the first probability, the second probability, the third probability, or the fourth probability. Alternatively, the reverse flow direction can be selected, opposite to the reading direction, from right to left. Finally, it is possible and preferred that the respective probabilities for both directions of passage are determined and stored separately. This has the advantage that a sentence to be generated subsequently can be easily extended or supplemented in both directions, starting from any start word from the text.

Die vorstehend beschriebenen Verfahrensschritte, in welchen die erläuterten Wahrscheinlichkeiten (erste bis vierte) bestimmt worden sind, beschreiben eine erste Phase eines Verfahrens zum maschinellen Verarbeiten von Texten. In dieser ersten Phase wird, ausgehend von einem vorgegebenen Textkorpus, eine Datenbasis aufgebaut, ausgehend von welcher in einer zweiten Phase, die nachfolgend beschrieben wird, Sätze maschinell erzeugt werden können.The method steps described above, in which the explained probabilities (first to fourth) have been determined, describe a first phase of a method for the machine processing of texts. In this first phase, starting from a given text corpus, a database is built up from which sentences can be generated automatically in a second phase, which is described below.

Die zweite Phase startet mit einem Schritt des Bereitstellens eines Anfragesatzes. Dies kann beispielsweise eine Frage sein, die an das System gestellt wird, welches das vorliegende Verfahren ausführt. Der Anfragesatz kann auch ein Satz sein, welcher sich dadurch ergibt, dass andere maschinelle Vorrichtungen, beispielsweise ein Spracherkennungssystem oder ein System zur automatischen Übersetzung von Texten, auf Basis des Text-Corpus einen Satz ausgeben, beispielsweise als ein von dem Spracherkennungssystem erkannter und ausgegebener Satz oder ein von dem System zur automatischen Übersetzung von Texten als automatische Übersetzung ausgegebener Satz.The second phase starts with a step of providing a query set. This can be, for example, a question that is asked of the system that carries out the present method. The query sentence can also be a sentence which results from the fact that other machine devices, for example a speech recognition system or a system for the automatic translation of texts, output a sentence based on the text corpus, for example as a sentence from the speech recognition system tem recognized and output sentence or a sentence output as an automatic translation by the system for the automatic translation of texts.

Der Anfragesatz umfasst zumindest teilweise Wörter aus dem erfassten Text, kann aber auch weitere, bisher nicht erfasste Wörter umfassen. In der Regel werden in diesem Schritt empfangene Anfragesätze nachfolgend in die Datenbasis mit aufgenommen, d.h. wie vorstehend mit Bezug auf die erste Phase beschrieben verarbeitet. Damit wird die Datenbasis erweitert. Ein solches Erweitern der Datenbasis kann in regelmäßigen oder unregelmäßigen Abständen erfolgen. Es ist aber auch eine Ausführungsform vorstellbar, in der ein oder mehrere Anfragesätze selbst die Datenbasis bilden, ohne dass zuvor ein anderer Text eingegeben und verarbeitet worden ist. Gemäß dieser Ausführungsform wird der zumindest eine Anfragesatz zuerst als Textbasis verstanden, und gemäß Phase 1 verarbeitet, und erst dann als eigentlicher „Anfragesatz“ im nachfolgend beschriebenen Sinn.The query sentence at least partially includes words from the recorded text, but can also include other words that have not previously been recorded. As a rule, query records received in this step are subsequently included in the database, i.e. processed as described above with reference to the first phase. This expands the database. Such an expansion of the database can take place at regular or irregular intervals. However, an embodiment is also conceivable in which one or more query records themselves form the database without any other text having been entered and processed beforehand. According to this embodiment, the at least one query sentence is first understood as a text basis and processed according to phase 1, and only then as an actual “query sentence” in the sense described below.

In einem nächsten Schritt wird eine vorgegebene Anzahl von Wörtern aus dem Anfragesatz ausgewählt. Die Auswahl erfolgt vorzugsweise derart, dass die ausgewählten Wörter im Vergleich zu nicht ausgewählten Wörtern des Anfragesatzes, welche ebenfalls in dem Text vorkommen, in dem Text mit einer geringeren Häufigkeit auftreten. Mit anderen Worten werden „sinntragende“ Wörter des Anfragesatzes, erkennbar an einer vergleichsweise geringen Auftrittshäufigkeit in dem Text, ausgewählt. Die Anzahl der ausgewählten Wörter kann variieren, abhängig beispielsweise von der Länge des Anfragesatzes.In a next step, a predetermined number of words is selected from the query sentence. The selection is preferably made in such a way that the selected words occur in the text with a lower frequency than non-selected words of the query sentence, which also occur in the text. In other words, "meaningful" words of the query sentence, recognizable by a comparatively low frequency of occurrence in the text, are selected. The number of words selected may vary depending, for example, on the length of the query sentence.

Die ausgewählten Wörter dienen nun, wie nachfolgend beschrieben, als Ausgangs- oder Startwörter zum automatischen Erzeugen eines Antwortsatzes. D.h. ein zu erzeugender Antwortsatz besteht zu Beginn nur aus einem oder wenigen der ausgewählten Wörter des Anfragesatzes und wird dann sukzessive ergänzt oder erweitert, in einer oder beiden möglichen Richtungen, in der Regel linear. Zum Ergänzen oder Erweitern werden in nachfolgenden Schritten so genannte Ergänzungswörter aus dem erfassten Text, auf Basis der in der ersten Phase aufgebauten Datenbasis, nach vorgegebenen, nachfolgend beschriebenen Regeln ausgewählt und an das aktuell vorliegende Antwortsatzfragment angefügt.As described below, the selected words now serve as source or start words for automatically generating an answer sentence. This means that a response sentence to be generated initially consists of only one or a few of the selected words of the query sentence and is then successively supplemented or expanded in one or both possible directions, usually linearly. In the following steps, so-called supplementary words are selected from the recorded text for supplementing or expanding on the basis of the database built up in the first phase, according to the rules described below and added to the currently available answer sentence fragment.

Die Schritte des Bestimmens eines Ergänzungswortes und des Ergänzens des Antwortsatzes, d.h. des zu diesem Zeitpunkt vorliegenden Antwortsatzfragments, können in Bezug auf verschiedene Durchlaufrichtungen erfolgen, d.h. in Leserichtung, entgegen der Leserichtung oder, was bevorzugt ist, auch in beide Richtungen.The steps of determining a supplementary word and supplementing the answer sentence, i.e. the answer sentence fragment available at this point in time, can be carried out in relation to different flow directions, i.e. in the reading direction, against the reading direction or, which is preferred, in both directions.

Zum Erzeugen des Antwortsatzes werden die Schritte des Bestimmens eines Ergänzungswortes und des Ergänzens des Antwortsatzes um das Ergänzungswort in der Regel so lange wiederholt, bis das Ergänzungswort als ein vorgegebenes Satzabschlusswort erkannt wird. Als Satzabschlusswörter dienen insbesondere die am Ende eines natürlichsprachlichen Satzes in der Regel angeordneten Satzzeichen, d.h. „.“, „?“, „!“, gegebenenfalls auch „:“ oder „;“. Dies gilt für beide Leserichtungen, da, wie vorstehend bereits beschrieben, ein „Satz“ für die Datenbasis vorliegend so erfasst wird, dass das erste Wort des Satzes (in Leserichtung) das abschließende Satzzeichen des vorhergehenden Satzes ist. Das Satzzeichen ist somit als ein Wort zweier aufeinanderfolgender Sätze verarbeitet. Dies ermöglicht ein einfaches Erkennen eines Satzanfangs, wenn ein Antwortsatz entgegen der herkömmlichen Leserichtung ergänzt wird.In order to generate the answer sentence, the steps of determining a supplementary word and adding the supplementary word to the answer sentence are generally repeated until the supplementary word is recognized as a predetermined sentence end word. The punctuation marks usually arranged at the end of a natural language sentence, i.e. ".", "?", "!", and possibly also ":" or ";" are used as sentence final words. This applies to both reading directions because, as already described above, a “sentence” for the database is recorded in such a way that the first word of the sentence (in the reading direction) is the final punctuation mark of the previous sentence. The punctuation mark is thus processed as one word of two consecutive sentences. This makes it easy to recognize the beginning of a sentence if an answer sentence is added in the opposite direction to the usual reading direction.

Zum Bestimmen eines Ergänzungswortes wird nun in einem weiteren Schritt eine so genannte Ergänzungswahrscheinlichkeit bestimmt.In order to determine a supplementary word, a so-called supplementary probability is determined in a further step.

Die Ergänzungswahrscheinlichkeit wird bestimmt auf Basis der vorstehend beschriebenen ersten Wahrscheinlichkeit und kann insbesondere mit der ersten Wahrscheinlichkeit übereinstimmen.The supplement probability is determined based on the first probability described above, and specifically may match the first probability.

Gemäß einer Variante kann die Ergänzungswahrscheinlichkeit auf Basis der ersten Wahrscheinlichkeit in Kombination mit der zweiten Wahrscheinlichkeit oder der dritten Wahrscheinlichkeit oder der vierten Wahrscheinlichkeit bestimmt werden.According to a variant, the complement probability can be determined based on the first probability in combination with the second probability or the third probability or the fourth probability.

Die Wahrscheinlichkeiten können dabei, wie eingangs beschrieben, mittels verschiedener mathematischer Operationen kombiniert werden.As described above, the probabilities can be combined using various mathematical operations.

Es ist natürlich ebenfalls möglich, die ersten Wahrscheinlichkeit mit mehr als einer der weiteren Wahrscheinlichkeiten zu kombinieren, also z.B. mit der zweiten und der dritten Wahrscheinlichkeit, oder mit der zweiten und der vierten Wahrscheinlichkeit, oder mit der zweiten, dritten und vierten Wahrscheinlichkeit.It is of course also possible to combine the first probability with more than one of the other probabilities, e.g. with the second and the third probability, or with the second and the fourth probability, or with the second, third and fourth probability.

Beispielsweise kann die Ergänzungswahrscheinlichkeit als das Minimum der ersten und der zweiten (oder der ersten und dritten) Wahrscheinlichkeit bestimmt werden oder als Summe der ersten Wahrscheinlichkeit mit der zweiten Wahrscheinlichkeit und/oder der dritten Wahrscheinlichkeit. Analog kann die Ergänzungswahrscheinlichkeit durch Produktbildung auf Basis der ersten und der zweiten (und/oder dritten) Wahrscheinlichkeit erfolgen.For example, the complement probability can be determined as the minimum of the first and the second (or the first and the third) probability or as the sum of the first probability with the second probability and/or the third probability. Analogously, the probability of supplementation can take place through product formation on the basis of the first and the second (and/or third) probability.

Aus dem vorstehenden wird deutlich, dass die „Ergänzungswahrscheinlichkeit“ nicht notwendigerweise eine Wahrscheinlichkeit im mathematischen Sinne sein muss, sondern lediglich ein wohldefinierter Wert, mittels welchem sich verschiedene potentielle Ergänzungswörter dahingehend vergleichen lassen, wie „wahrscheinlich“ (gemessen mit der ersten Wahrscheinlichkeit und gegebenenfalls der zweiten/dritten/vierten Wahrscheinlichkeit) es gemäß dem erfassten und verarbeiteten Text-Corpus ist, dass sich das aktuell vorliegende Antwortsatzfragment in einer vorgegebenen Durchlaufrichtung durch das Ergänzungswort fortsetzt.From the above it is clear that the "supplement probability" does not necessarily have to be a probability in the mathematical sense, but merely a well-defined value by means of which different potential complement words can be compared in terms of how "probable" (measured with the first probability and, if necessary, the second/third/fourth probability) it is according to the detected and processed text corpus that the answer sentence fragment currently present continues in a predetermined direction of passage through the complement word.

Im nachfolgenden Schritt wird also, wie bereits allgemein beschrieben, ausgehend von zumindest einem der ausgewählten Wörter, ein Antwortsatz erzeugt, ausgehend von dem ausgewählten Wort als Startwort, und auf Basis der bestimmten Ergänzungswahrscheinlichkeit. Dazu werden folgende Teilschritte ausgeführt:

  • Es wird ein Ergänzungswort aus dem Text dadurch bestimmt, dass das Ergänzungswort aus einer Menge vorgegebener Größe von potentiellen Ergänzungswörtern ausgewählt wird, welche aus denjenigen potentiellen Ergänzungswörtern besteht, die mit Bezug zu einer vorgegebene Durchlaufrichtung und mit Bezug zu dem Antwortsatz die höchsten Ergänzungswahrscheinlichkeiten aufweisen.
In the subsequent step, as already generally described, an answer sentence is generated based on at least one of the selected words, based on the selected word as the start word and on the basis of the probability of completion determined. The following sub-steps are carried out for this purpose:
  • A supplementary word is determined from the text by selecting the supplementary word from a set of a predetermined size of potential supplementary words, which consists of those potential supplementary words which have the highest supplementary probabilities in relation to a predetermined flow direction and in relation to the answer sentence.

Mit anderen Worten werden auf Basis des aktuellen Antwortsatzfragments und mit Bezug zu einer vorgegebene Durchlaufrichtung die „wahrscheinlichsten“ Ergänzungen auf Basis der in der ersten Phase aufbereiteten Daten in einer Menge zusammengefasst, und aus dieser Menge wird dann das Ergänzungswort für den aktuellen Schritt ausgewählt.In other words, based on the current answer sentence fragment and with reference to a given flow direction, the "most probable" additions are combined into a set based on the data processed in the first phase, and the additional word for the current step is then selected from this set.

Gemäß einer ersten einfachen Variante kann die Menge die Größe eins haben, d.h. nur dasjenige Ergänzungswort mit der maximalen Ergänzungswahrscheinlichkeit umfassen. Dann erübrigt sich der Schritt des Auswählens.According to a first simple variant, the quantity can have the size one, i.e. only include that supplementary word with the maximum probability of being completed. Then the step of selecting is unnecessary.

In dem Fall, dass die Menge mehrere potentielle Ergänzungswörter umfasst, kann die Auswahl nach verschiedenen Kriterien oder auch gemäß einer Heuristik erfolgen. Gemäß einer in diesem Zusammenhang bevorzugten Variante kann zum Auswählen des Ergänzungswortes aus der Menge der potentiellen Ergänzungswörter jeweils eine Ähnlichkeit eines der potentiellen Ergänzungswörter zu dem Anfragesatz gemäß einem vorgegebenen Ähnlichkeitsmaß bestimmt werden.If the set includes a number of potential supplementary words, the selection can be made according to various criteria or also according to a heuristic. According to a variant that is preferred in this context, in order to select the supplementary word from the set of potential supplementary words, a similarity of one of the potential supplementary words to the query sentence can be determined according to a predetermined degree of similarity.

Die Ähnlichkeit kann beispielsweise syntaktischer Natur sein und beispielsweise schlicht die maximale Zeichenähnlichkeit des Ergänzungswortes zu einem Wort des Anfragesatzes messen. Die Ähnlichkeit kann alternativ oder zusätzlich eine semantische Komponente umfassen und beispielsweise eine Ähnlichkeit auf Basis einer vorgegebenen Synonymdatenbasis angeben.The similarity can be of a syntactic nature, for example, and simply measure the maximum character similarity of the supplementary word to a word of the query sentence. Alternatively or additionally, the similarity can include a semantic component and, for example, indicate a similarity on the basis of a predefined synonym database.

Es wird dann ein potentielles Ergänzungswort als Ergänzungswort aus einer Teilmenge der Menge der potentiellen Ergänzungswörter ausgewählt wird, wobei die Teilmenge aus denjenigen potentiellen Ergänzungswörtern der Menge besteht, welche die höchsten Ähnlichkeiten zum Anfragesatz innerhalb der Menge potentieller Ergänzungswörter aufweisen. Aus der Teilmenge kann dann ein Ergänzungswort nach einer vorgegebenen Regel oder Heuristik ausgewählt werden.A potential supplementary word is then selected as supplementary word from a subset of the set of potential supplementary words, the subset consisting of those potential supplementary words in the set that have the greatest similarities to the query sentence within the set of potential supplementary words. A supplementary word can then be selected from the subset according to a predetermined rule or heuristic.

Schließlich wird in dem abschließenden Teilschritt der Antwortsatz, d.h. das aktuell vorliegende Antwortsatzfragment, in Durchlaufrichtung um das Ergänzungswort ergänzt oder erweitert.Finally, in the final sub-step, the answer sentence, i.e. the currently available answer sentence fragment, is supplemented or extended by the supplementary word in the direction of flow.

In der beschriebenen Weise kann durch wiederholte Anwendung der vorstehend beschriebenen Schritte der Antwortsatz schrittweise in eine oder beide Richtungen solange ergänzt werden, bis Anfang und Ende eines Satzes, anhand erkannter Satzabschlusswörter, erkannt werden. Ein als vollständig erkannter Antwortsatz kann ausgegeben werden.In the manner described, the answer sentence can be supplemented step by step in one or both directions by repeated application of the steps described above until the beginning and end of a sentence are recognized on the basis of recognized sentence terminating words. A response set recognized as complete can be output.

Es versteht sich, dass gemäß dem vorstehenden Verfahren, ausgehend von einem Startwort, nicht lediglich immer nur ein Antwortsatz erzeugt werden kann, sondern eine Mehrzahl von Antwortsatzvarianten. Dabei kann ausgehend von einem ausgewählten Wort eine Mehrzahl von Antwortsatzvarianten dadurch gebildet werden, dass der Antwortsatz, d.h. das jeweils vorliegende Fragment einer Antwortsatzvariante, jeweils durch ein Ergänzungswort aus der Menge vorgegebener Größe von potentiellen Ergänzungswörtern ergänzt wird. Wenn die Menge der potentiellen Ergänzungswörter beispielsweise immer vier Ergänzungswörter umfasst, so können in jeder Stufe, d.h. in jedem Ergänzungsschritt, vier mögliche Antwortsatzvarianten erzeugt werden; die Anzahl der erzeugten Varianten ist somit eine 4-er Potenz. Auch gemäß dieser Ausführungsform kann alternativ oder zusätzlich die Ähnlichkeitsbetrachtung mit Bezug zum Anfragesatz herangezogen werden, um eine Auswahl eines Ergänzungswortes zu unterstützen, beispielsweise wenn die Menge der potentiellen Ergänzungswörter größer ist als die Anzahl zu erzeugender Varianten in jedem Schritt.It goes without saying that according to the above method, starting from a start word, not only one answer sentence can be generated, but a plurality of answer sentence variants. Starting from a selected word, a plurality of answer sentence variants can be formed in that the answer sentence, ie the respective fragment of an answer sentence variant, is in each case supplemented by a supplementary word from the set of predetermined size of potential supplementary words. If the set of potential supplementary words always includes four supplementary words, four possible answer sentence variants can be generated in each stage, ie in each supplementary step; the number of generated variants is thus a power of 4. According to this embodiment, the similarity analysis with reference to the query sentence can also be used as an alternative or in addition to support the selection of a supplementary word, for example if the number of potential supplementary words is greater than the number of variants to be generated in each step.

Die jeweils erzeugten Antwortsatzvarianten können dann ausgegeben werden. Gemäß einer bevorzugten Ausführungsform können die Antwortsatzvarianten mittels zumindest einer der nachfolgenden Bewertungskriterien in einer dritten Phase bewertet werden. Danach kann zumindest ein Antwortsatzes aus den Antwortsatzvarianten auf Basis der Bewertung ausgewählt und ausgegeben werden.The response sentence variants generated in each case can then be output. According to a preferred embodiment, the answer sentence variants can be evaluated using at least one of the following evaluation criteria in a third phase. At least one answer sentence can then be selected from the answer sentence variants based on the evaluation and output.

Mögliche Bewertungskriterien sind beispielsweise:

  • • Summe der Wortfolgewahrscheinlichkeiten;
  • • Summe der n-Gramm-Wahrscheinlichkeiten;
  • • Informationsgehalt, auf Basis der Häufigkeiten, mit der die Wörter der jeweiligen Antwortsatzvariante im Text vorkommen;
  • • Ähnlichkeit der Antwortsatzvariante zum Anfragesatz oder zu einem Teil des Anfragesatzes.
Examples of possible evaluation criteria are:
  • • sum of word order probabilities;
  • • sum of n-gram probabilities;
  • • Information content, based on the frequency with which the words of the respective answer sentence variant appear in the text;
  • • Similarity of the answer sentence variant to the query sentence or to a part of the query sentence.

Zur Erläuterung der Bewertungskriterien werden folgende Bezeichnungen verwendet:

  • Ein Antwortsatz ist durch die Wortsequenz w1, w2, ..., wn gegeben, der Anfragesatz wird mit w 1 ' ,   w 2 ' , ,   w l 1 '
    Figure DE102021006511A1_0010
    bezeichnet.
The following designations are used to explain the evaluation criteria:
  • A response sentence is given by the word sequence w 1 , w 2 , ..., w n , the query sentence is given with w 1 ' , w 2 ' , ... , w l 1 '
    Figure DE102021006511A1_0010
    designated.

Eine Summe S1 von Wortfolgewahrscheinlichkeiten wird wie folgt bestimmt: s 1 = i = 2 n p r ( ( w i | w i 1 ) + p l ( w i 1 | w i ) ) ,

Figure DE102021006511A1_0011
wobei mit pr bzw. pl jeweils die Wortfolgewahrscheinlichkeit in Leserichtung bzw. gegen die Leserichtung bezeichnet werden.A sum S 1 of word order probabilities is determined as follows: s 1 = i = 2 n p right ( ( w i | w i 1 ) + p l ( w i 1 | w i ) ) ,
Figure DE102021006511A1_0011
where p r and p l respectively denote the word sequence probability in the reading direction and against the reading direction.

Eine Summe s2 von n-Gramm-Wahrscheinlichkeiten wird wie folgt bestimmt: s 2 = i = 4 n p r ( ( w i | w i 3 , w i 2 , w i 1 ) + p l ( w i 3 | w i 2 , w i 1 , w i ) ) ,

Figure DE102021006511A1_0012
A sum s 2 of n-gram probabilities is determined as follows: s 2 = i = 4 n p right ( ( w i | w i 3 , w i 2 , w i 1 ) + p l ( w i 3 | w i 2 , w i 1 , w i ) ) ,
Figure DE102021006511A1_0012

Ein Informationsgehalt S3 einer Nachricht wird gemessen, indem die Wörter des Textes anhand der Häufigkeit sortiert und dementsprechend indiziert werden, und dann die Wortindizes wi des Antwortsatzes aufsummiert werden: s 3 = i = 1 n w i

Figure DE102021006511A1_0013
An information content S 3 of a message is measured by sorting the words of the text based on frequency and indexing them accordingly, and then adding up the word indices w i of the response sentence: s 3 = i = 1 n w i
Figure DE102021006511A1_0013

Eine Ähnlichkeit s4 des Antwortsatzes zum Anfragesatz kann beispielsweise wie folgt berechnet werden: s 4 = i = 1 n j = 1 l 2 δ ( w i , w j " ) ,

Figure DE102021006511A1_0014
wobei mit w 1 " , w 2 " , , w l 2 "
Figure DE102021006511A1_0015
die unterscheidbaren Wörter des Anfragesatzes w 1 ' , w 2 ' , , w l 1 '
Figure DE102021006511A1_0016
bezeichnet werden, und mit δ das Kroneckersymbol.For example, a similarity s 4 of the response set to the query set can be calculated as follows: s 4 = i = 1 n j = 1 l 2 δ ( w i , w j " ) ,
Figure DE102021006511A1_0014
where with w 1 " , w 2 " , ... , w l 2 "
Figure DE102021006511A1_0015
the distinguishable words of the query sentence w 1 ' , w 2 ' , ... , w l 1 '
Figure DE102021006511A1_0016
be denoted, and δ the Kronecker symbol.

Alternativ kann eine Ähnlichkeit S5 des Antwortsatzes zum Anfragesatz bestimmt werden als: s 5 = i = 1 n j = 1 k ( k j 1 ) δ ( w i , w j s ) ,

Figure DE102021006511A1_0017
wobei die Wörter w 1 s , w 2 s , , w k s
Figure DE102021006511A1_0018
diejenigen Wörter des Anfragesatzes mit den geringsten Häufigkeiten sind.Alternatively, a similarity S 5 of the response set to the query set can be determined as: s 5 = i = 1 n j = 1 k ( k j 1 ) δ ( w i , w j s ) ,
Figure DE102021006511A1_0017
where the words w 1 s , w 2 s , ... , w k s
Figure DE102021006511A1_0018
are those words of the query sentence with the lowest frequencies.

Jedes dieser Bewertungskriterien kann einzeln oder in geeigneter Kombination mit einem oder mehreren anderen Bewertungskriterien herangezogen werden.Each of these evaluation criteria can be used individually or in a suitable combination with one or more other evaluation criteria.

Jedes dieser Bewertungskriterien kann auch normalisiert werden, indem die Bewertung Si(a) für einen Satz a = w1, w1,..., wn durch die Summe oder das Maximum aller Bewertungen dividiert wird.Each of these scoring criteria can also be normalized by dividing the score S i (a) for a set a=w 1 , w 1 ,..., w n by the sum or maximum of all scores.

Die derart normierten Bewertungen können aufsummiert werden, wodurch sich eine Gesamtbewertung S eines Satzes ergibt: s ( a ) = i = 1 5 s i ( a ) m a x b s i ( b ) .

Figure DE102021006511A1_0019
The ratings normalized in this way can be summed up, resulting in an overall rating S of a sentence: s ( a ) = i = 1 5 s i ( a ) m a x b s i ( b ) .
Figure DE102021006511A1_0019

Alternativ könnten die Bewertungen auch unterschiedlich stark gewichtet werden.Alternatively, the ratings could also be weighted differently.

Außerdem könnte anstatt einer Normalisierung der Bewertungen durchzuführen ein Rang der Bewertung bestimmt (je größer die Bewertung, desto größer der Rang). Die einzelnen Ränge könnten dann ebenfalls aufsummiert oder gewichtet aufsummiert werden, um eine Gesamtbewertung s'(a) zu bestimmen.Also, instead of normalizing the scores, a rank of the score could be determined (the larger the score, the larger the rank). The individual ranks could then also be summed or weighted to determine an overall score s'(a).

Eine bevorzugte Ausführungsform einer erfindungsgemäßen Vorrichtung zum maschinellen Verarbeiten eines Textes umfasst zumindest einen Speicher und zumindest einen Prozessor.A preferred embodiment of a device according to the invention for machine processing of a text comprises at least one memory and at least one processor.

Die Vorrichtung ist eingerichtet, ein vorstehend beschriebenes Verfahren auszuführen, zumindest den Schritt des Erfassens und Speichers des Textes und den Schritt des Bestimmens der ersten Wahrscheinlichkeit, vorzugsweise aber auch die zum Erzeugen eines Antwortsatzes notwendigen Schritte.The device is set up to carry out a method as described above, at least the step of acquiring and storing the text and the step of determining the first probability, but preferably also the steps necessary for generating an answer sentence.

Gemäß einer ersten bevorzugten Ausführungsform umfasst die Vorrichtung ein Spracherkennungssystem oder ein System zur automatischen Übersetzung von Texten.According to a first preferred embodiment, the device comprises a speech recognition system or a system for the automatic translation of texts.

Die Vorrichtung ist dann eingerichtet, auf Eingabe eines Anfragesatzes, welcher ein von dem Spracherkennungssystem ausgegebenes Satzfragment auf Basis einer teilweise verarbeiteten Spracheingabe oder ein von dem System zur automatischen Übersetzung von Texten als automatische partielle Übersetzung ausgegebenes Satzfragment ist, einen Antwortsatz zu erzeugen, welcher das jeweilige Satzfragment ergänzt.The device is then set up, upon input of a query sentence, which is a sentence fragment output by the speech recognition system based on a partially processed speech input or a sentence fragment output by the system for automatic translation of texts as an automatic partial translation, to generate a response sentence which contains the respective Sentence fragment added.

Die Ergänzung erfolgt derart, dass eine Erkennungsgenauigkeit des Spracherkennungssystems oder eine Korrektheit des Systems zur automatischen Übersetzung von Texten verbessert werden kann, indem eine Menge seitens des Spracherkennungssystems oder des Systems zur automatischen Übersetzung von Texten grundsätzlich herangezogenen Ergänzungswörtern auf Basis der Ergänzungswahrscheinlichkeit eingeschränkt wird.The supplementation takes place in such a way that a recognition accuracy of the speech recognition system or a correctness of the system for the automatic translation of texts can be improved by restricting a set of supplementary words that are fundamentally used by the speech recognition system or the system for the automatic translation of texts on the basis of the supplementary probability.

D.h. mittels des erfindungsgemäßen Verfahrens können, abhängig von der bisher verstandenen Spracheingabe oder dem bisher übersetzen Anteil eines Satzes, die weitere Spracheingabe oder der Rest des zu übersetzenden Textes interpretiert werden.This means that the further speech input or the rest of the text to be translated can be interpreted by means of the method according to the invention, depending on the previously understood speech input or the previously translated portion of a sentence.

Gemäß einer zweiten bevorzugten Ausführungsform kann die Vorrichtung weiterhin eine Eingabeeinrichtung zum Eingeben zumindest eines Teils des Anfragesatzes durch einen Nutzer der Vorrichtung umfassen, beispielsweise eine Tastatur, ein berührungsempfindliches Display, eine Spracheingabe oder dergleichen.According to a second preferred embodiment, the device can further comprise an input device for a user of the device to input at least part of the query sentence, for example a keyboard, a touch-sensitive display, a voice input or the like.

Die Vorrichtung umfasst auch eine Ausgabeeinrichtung zum Ausgeben einer Mehrzahl von Ergänzungswörtern, welche im Rahmen der Erzeugung eines Antwortsatzes oder einer Antwortsatzvariante bestimmt worden sind, beispielsweise ein Display oder eine Sprachausgabe.The device also includes an output device for outputting a plurality of supplementary words which have been determined as part of the generation of an answer sentence or an answer sentence variant, for example a display or a voice output.

Weiterhin umfasst die Vorrichtung eine Auswahleinrichtung, mittels welcher der Nutzer ein Ergänzungswort aus der Mehrzahl der ausgegebenen Ergänzungswörter zum Ergänzen des Antwortsatzes oder der Antwortsatzvariante auswählen kann.Furthermore, the device includes a selection device, by means of which the user can select a supplementary word from the plurality of supplementary words output to supplement the answer sentence or the answer sentence variant.

Diese Vorrichtung kann beispielsweise sprachgestörten Menschen darin unterstützen, sich auf einfache Weise zu artikulieren.This device can, for example, help speech-impaired people to articulate themselves in a simple way.

Figurenlistecharacter list

Die Erfindung wird nachfolgend anhand eines Ausführungsbeispiels und dazugehöriger Zeichnungen beispielhaft näher erläutert. Die Figuren zeigen:

  • 1 basierend auf einer Datenbasis von ca. 38 Mio. Wörtern, welche mn = 3 Worte mit der kleinsten Häufigkeit bei Durchlaufen eines angegebenen Satzes in Leserichtung an jeder Leseposition aufgefunden worden sind;
  • 2a einen Pfad durch einen Zustandsraum aufgrund einer ersten Bewertung einzelner Worte eines Satzes;
  • 2b zwei verschiedene Pfade durch den Zustandsraum, wenn zwei verschiedene Bewertungsschemata zur Bewertung verwendet werden, für die gleichen Worte des Satzes;
  • 3 Schritte einer bevorzugten Ausführungsform eines Verfahrens zum maschinellen Verarbeiten von Texten;
  • 4A eine erste bevorzugte Ausführungsform einer Vorrichtung zum maschinellen Verarbeiten von Texten;
  • 4B eine zweite bevorzugte Ausführungsform einer Vorrichtung zum maschinellen Verarbeiten von Texten; und
  • 4C eine dritte bevorzugte Ausführungsform einer Vorrichtung zum maschinellen Verarbeiten von Texten.
The invention is explained in more detail below using an exemplary embodiment and associated drawings. The figures show:
  • 1 based on a database of approximately 38 million words, which m n = 3 words have been found with the smallest frequency when running through a specified sentence in the reading direction at each reading position;
  • 2a a path through a state space based on a first evaluation of individual words of a sentence;
  • 2 B two different paths through the state space, if two different scoring schemes are used for scoring, for the same words of the sentence;
  • 3 Steps of a preferred embodiment of a method for processing text;
  • 4A a first preferred embodiment of a text machine processing apparatus;
  • 4B a second preferred embodiment of a text machine processing apparatus; and
  • 4C a third preferred embodiment of an apparatus for processing texts.

Detaillierte Beschreibung der ErfindungDetailed description of the invention

Wie bereits eingangs erläutert, dient Sprache nicht zur reinen Wiedergabe von zuvor Gesagtem, sondern soll manchmal auch einen aktuellen Zustand spiegeln, der sich nur indirekt, z.B. aus einem Textumfeld oder anhand von gemessenen Sensordaten, ergibt.As already explained at the beginning, speech is not just used to reproduce what has been said before, but is sometimes also intended to reflect a current state that only results indirectly, e.g. from a text environment or based on measured sensor data.

Ein solcher Zustand kann auch einen Zustand eines Schreibers oder Sprechers des jeweiligen Textes widerspiegeln. Mit Schreiber oder Sprecher ist in diesem Zusammenhang auch ein Roboter oder sonstige Maschine gemeint, die ihren Zustand anhand von Sensoren bestimmt (Temperatur, Abstandssensoren, Lagesensoren).Such a state can also reflect a state of a writer or speaker of the respective text. In this context, writer or speaker also means a robot or other machine that determines its status using sensors (temperature, distance sensors, position sensors).

Betrachten wir das vorstehend bereits angesprochene Beispiel. Es soll der Satzanfang „Mir geht es ...“ fortgesetzt werden. Wir könnten hierzu z.B. die Worte „gut“ oder „schlecht“ in Abhängigkeit von einem bestimmten Zustand einsetzen. Dieser Zustand kann auch eine Situation des Sprechers/Schreibers abbilden.Let's look at the example mentioned above. The beginning of the sentence "I'm fine..." should be continued. For example, we could use the words "good" or "bad" depending on a certain state. This state can also depict a situation of the speaker/writer.

Wir berechnen, wie vorstehend erläutert, wie Wahrscheinlichkeiten p Z u s t a n d = z 1 ( w i | w i 1 )  und  p Z u s t a n d = z 2 ( w i | w i 1 ) ,

Figure DE102021006511A1_0020
welche angeben, wie wahrscheinlich das Wort wi im Zustand Z1 und im Zustand Z2 erscheint.We calculate probabilities as explained above p Z and s t a n i.e = e.g 1 ( w i | w i 1 ) and p Z and s t a n i.e = e.g 2 ( w i | w i 1 ) ,
Figure DE102021006511A1_0020
which indicate how probable the word w i appears in state Z1 and in state Z2.

Wie vorstehend bereits erläutert, unter der Annahme, dass ein einem Wort zugeordneter Wert ein 3-dimensionaler Vektor mit Einträgen im Intervall [0, 1] ist, und dass sich ein über solche Werte zu berechnender Zustand in der gleichen Weise darstellen lässt, so wäre in einem „positiven“ Zustand Z1, der sich durch eher hohe Vektorkomponenten auszeichnet, wie z.B. [1.0, 1.0, 1.0], die erste Wahrscheinlichkeit des Wortes „gut“ (welches ebenfalls einen „positiven“ Wert besitzt, wie z.B. [0.8, 0.75, 0.9]) höher als die erste Wahrscheinlichkeit des Wortes „schlecht“, welches eher eine niedrige Bewertung aufweist (wie z.B. [0.2, 0.35, 0.1]).As explained above, assuming that a value associated with a word is a 3-dimensional vector with entries in the interval [0,1], and that a state to be computed via such values can be represented in the same way, it would be in a "positive" state Z1, which is characterized by rather high vector components, such as [1.0, 1.0, 1.0], the first probability of the word "good" (which also has a "positive" value, such as [0.8, 0.75 , 0.9]) higher than the first probability of the word "poor", which tends to have a low score (such as [0.2, 0.35, 0.1]).

In analoger Weise wäre die erste Wahrscheinlichkeit für das Wort „schlecht“ in einem Zustand Z2, der eher eine negative Einstellung beschreibt (wie z.B. [0.0, 0.0, 0.0]), deutlich höher als die erste Wahrscheinlichkeit für das Wort „gut“.In an analogous way, the first probability for the word "bad" in a state Z2, which describes more of a negative attitude (such as [0.0, 0.0, 0.0]), would be significantly higher than the first probability for the word "good".

Beim Menschen können von außen, wie auch von innen eintreffende Ereignisse eine Zustandsänderung bewirken. Um den Zustand zu bestimmen, könnten Basisemotionen, wie Freude, Überraschung, Wut, Traurigkeit, Angst oder Ekel herangezogen werden.Events from the outside as well as from the inside can bring about a change in the human condition. Basic emotions such as joy, surprise, anger, sadness, fear or disgust could be used to determine the condition.

Noch elementarer können Hormone oder Stoffe im Blut zur Zustandsbestimmung verwendet werden. Nehmen wir zur Beschreibung des Zustands einen k-dimensionalen Vektor z = ( z 1 , z 2 , , z k )  mit  z i [ 0,1 ] .

Figure DE102021006511A1_0021
Ein Wert von zi = 0 würde z.B. die Abwesenheit eines Hormons signalisieren, während zi = 1 die maximale Anwesenheit desselben Hormons signalisieren würde.Even more elementary, hormones or substances in the blood can be used to determine the condition. Let's take a k-dimensional vector to describe the state e.g = ( e.g 1 , e.g 2 , ... , e.g k ) with e.g i [ 0.1 ] .
Figure DE102021006511A1_0021
For example, a value of zi = 0 would signal the absence of a hormone, while zi = 1 would signal the maximum presence of the same hormone.

Diskretisieren wir jede Komponente mit b Stufen, so ergeben sich bk verschiedene Zustände. Jeder einzelne Zustand z kann auf einen der bk verschiedenen diskreten Zustände abgebildet werden. Es sei d(z) die Abbildung, die jedem Vektor z einen der diskreten Zustände zuweist.If we discretize each component with b levels, we get b k different states. Each individual state z can be mapped to one of the b k different discrete states. Let d(z) be the mapping that assigns one of the discrete states to each vector z.

Neben köpereigenen Hormonen, können auch die bisher ausgesprochenen Worte beim Sprecher oder auch beim Zuhörer dafür sorgen, dass ein bestimmter Zustand eingenommen wird. Wie bereits beschrieben, existieren Lexika, die angeben, wie für jedes Wort eine Klassifizierung entlang der drei Dimensionen Valenz (valence)/Erregung (arousal)/Dominanz (dominance) vorzunehmen ist, sog. VAD-Lexika.In addition to endogenous hormones, the words that have been spoken so far can also cause the speaker or the listener to enter a certain state. As already described, there are lexicons that specify how each word is to be classified along the three dimensions of valence/arousal/dominance, so-called VAD lexicons.

Sei mit e(wi) = [ev, ea, ed] ein 3-dimensionaler Vektor für eine derartige Klassifikation gegeben, welcher einen Richtungsvektor für ein Wort wi definiert.Let e(w i )=[e v , e a , ed ] be a 3-dimensional vector for such a classification, which defines a directional vector for a word w i .

Beim Verarbeiten einer Textsequenz, wie beispielsweise eines Teilsatzes, können für alle Wörter dieser Sequenz die Werte e(wi) aufsummiert werden, wobei durch geeignete Begrenzung (wie bereits erwähnt) sichergestellt werden kann, dass die Summation den definierten Bereich, z.B. [-1, 1] oder [0,1], komponentenweise nicht verlässt.When processing a text sequence, such as a partial sentence, the values e(w i ) can be summed up for all words in this sequence, it being possible to ensure by suitable limitation (as already mentioned) that the summation covers the defined range, eg [-1 , 1] or [0,1], does not leave componentwise.

Wie entsprechende Wahrscheinlichkeiten mit Bezug zu einer solchen Bewertung bestimmt werden können, haben wir vorstehend mit Bezug zu dem Teilsatz „Mir geht es ...“ bereits exemplarisch erläutert.We have already explained above with reference to the sub-sentence "It's me..." as an example of how corresponding probabilities can be determined with reference to such an evaluation.

Wie ebenfalls bereits erwähnt, kann diese Wahrscheinlichkeit mit anderen Wahrscheinlichkeiten, die vorstehend beschrieben worden sind, kombiniert werden, um eine aus Ressourcengründen praktisch nicht berechenbare Wahrscheinlichkeit
p(wi|w1w2 ... wi-1) zu approximieren: p ( w i | w 1 w 2 w i 1 )

Figure DE102021006511A1_0022
o p { ( p 2 ( w i | w i 2 w i 1 ) ;
Figure DE102021006511A1_0023
Unmittelbarer Kontext
p Δ t ( w i ) ) ;
Figure DE102021006511A1_0024
Kurzzeitlicher Kontext
p m ' ( w i ) ) ;
Figure DE102021006511A1_0025
Langfristiger Kontext
p Z u s t a n d = d ( w i | w i 1 ) }
Figure DE102021006511A1_0026
Situationsbedingter Kontext
„op {...}“ bezeichnet hier, wie bereits erwähnt, eine oder mehrere geeignete mathematische Operationen zum Kombinieren dieser Wahrscheinlichkeiten, wie z.B. Minimum, Addition oder Multiplikation.As also already mentioned, this probability can be combined with other probabilities that have been described above to produce a probability that cannot be calculated in practice for resource reasons
p(w i |w 1 w 2 ... w i-1 ) to approximate: p ( w i | w 1 w 2 ... w i 1 )
Figure DE102021006511A1_0022
O p { ( p 2 ( w i | w i 2 w i 1 ) ;
Figure DE102021006511A1_0023
immediate context
p Δ t ( w i ) ) ;
Figure DE102021006511A1_0024
short-term context
p m ' ( w i ) ) ;
Figure DE102021006511A1_0025
long-term context
p Z and s t a n i.e = i.e ( w i | w i 1 ) }
Figure DE102021006511A1_0026
situational context
As already mentioned, "op {...}" denotes one or more suitable mathematical operations for combining these probabilities, such as minimum, addition or multiplication.

Die Wahrscheinlichkeiten können auch in geeigneter Weise entweder vor der Verwendung der „op“-Operation oder danach transformiert werden. Als Möglichkeiten existieren z.B. die Berechnung der relativen Wahrscheinlichkeiten, die Berechnung der Wahrscheinlichkeit der Alternativen unter Berücksichtigung der vorangegangenen Worte

Figure DE102021006511A1_0027
wenn wn die Wortalternative ist, ein Maß für die Worthäufigkeit oder ein Maß für die umgekehrte Worthäufigkeit.The probabilities can also be suitably transformed either before using the "op" operation or after. Possibilities include, for example, the calculation of the relative probabilities, the calculation of the probability of the alternatives taking into account the preceding words
Figure DE102021006511A1_0027
if w n is the word alternative, a measure of word frequency or a measure of inverse word frequency.

Anstatt ein VAD-Lexikon zu nutzen, können die Vektoren e(w) wie erwähnt, zumindest teilweise auch durch Zufallsvektoren ersetzt werden. VAD-Lexika klassifizieren in der Regel nur eine Teilmenge aller Worte. Stopp-Worte besitzen üblicher Weise keine VAD-Klassifikation. Bei der Verwendung von Zufallsvektoren kann jedoch allen Wörtern ein von Null verschiedener Klassifikationsvektor zugewiesen werden. Damit können auch neutrale Satzanfänge, wie z.B. „Mir geht es ...“ zur Klassifikation der möglichen Folgewörter verwendet werden. Auf diese Weise kann ein Satz in Fragmente zerlegt und wieder zusammengesetzt werden.Instead of using a VAD lexicon, the vectors e(w) can, as mentioned, at least partially be replaced by random vectors. VAD lexicons usually only classify a subset of all words. Stop words usually do not have a VAD classification. When using random vectors however, all words can be assigned a non-zero classification vector. This means that neutral sentence beginnings, such as "I'm fine..." can also be used to classify possible follow-up words. In this way, a sentence can be broken down into fragments and put back together again.

Oben skizzierter Ansatz ist in den 2A und 2B illustriert.The approach outlined above is in the 2A and 2 B illustrated.

Dabei wird durch jedes Wort aus dem Satz der Zustand entsprechend dem assoziierten Wort-Zustands-Vektor verändert. So lassen sich für jedes Wort die Folgewahrscheinlichkeiten p(wt|wi-1) in bk verschiedene Wahrscheinlichkeiten PZustand=d(wi|wi-1) aufteilen.Each word from the sentence changes the state according to the associated word-state vector. For each word, the subsequent probabilities p(w t |w i-1 ) can be divided into b k different probabilities P state = d (wi|w i-1 ).

Sofern bk hinreichend groß ist, können auf diese Weise Sätze in ihre Einzelteile zerlegt und wieder zusammengesetzt werden.As long as bk is sufficiently large, sentences can be broken down into their individual parts and reassembled in this way.

Die Wahrscheinlichkeit pZustand=d(wilwi-1) wird auch als situationsbedingte Wahrscheinlichkeit

Figure DE102021006511A1_0028
bezeichnet.The probability p state=d (w i lw i-1 ) is also called the situational probability
Figure DE102021006511A1_0028
designated.

Durch den Einsatz von Zufallsvektoren ist das Verfahren auch skalierbar.The method is also scalable through the use of random vectors.

Es können durchaus mehrere Wahrscheinlichkeiten p d , p d ' , p d "

Figure DE102021006511A1_0029
verwendet werden, indem für p d ( w i | w i 1 )
Figure DE102021006511A1_0030
andere Bewertungsvektoren (VAD-Vektoren oder zufällig gewählte Vektoren) verwendet werden als für p d ' ( w i | w i 1 ) .
Figure DE102021006511A1_0031
There may well be multiple probabilities p i.e , p i.e ' , p i.e "
Figure DE102021006511A1_0029
be used by for p i.e ( w i | w i 1 )
Figure DE102021006511A1_0030
other evaluation vectors (VAD vectors or randomly chosen vectors) are used than for p i.e ' ( w i | w i 1 ) .
Figure DE102021006511A1_0031

Auf diese Weise ergeben sich für ein und denselben Satzanfang verschiedene Endpositionen im Zustandsraum. Die möglichen Folgeworte werden so aufgrund des Satzanfangs über den Zustandsraum verteilt und erlauben somit ein Zusammensetzen des Satzes.This results in different end positions in the state space for one and the same beginning of a sentence. The possible subsequent words are thus distributed over the state space based on the beginning of the sentence and thus allow the sentence to be assembled.

(nachfolgend eingeblendet) zeigt experimentelle Ergebnisse. Word Classification b lp d l q n q e i none 3 0 0.390 0.342 12.247 VAD 3 1 0.390 0.342 12.247 Random 3 1 0.420 0.344 12.205 Random 5 1 0.440 0.355 11.981 Random 9 1 0.490 0.406 10.675 Random 3 2 0.430 0.350 12.172 Random 5 2 0.470 0.371 11.787 Random 9 2 0.520 0.429 9.598 Random 3 3 0.450 0.353 12.140 Random 5 3 0.470 0.382 11.698 Random 9 3 0.530 0.448 9.085
. Reproduction von Sätzen aus dem Korpus. qn ist der Anteil an korrekt erzeugten Sätzen (größer ist besser). qe Anteil der Wörter, die korrekt als Folgewort bestimmt wurden (größer ist besser). i mittlerer Index der korrekten Folgewörter in der sortierten Liste der Folgewörter (kleiner ist besser). VAD bedeutet, daß pd gemäß eines VAD-Lexikons bestimm wurde, Random drückt aus, daß zur Wortbeschreibung Zufallsvektoren bestimmt wurden.
(shown below) shows experimental results. Word classification b l p d l q n qe _ i none 3 0 0.390 0.342 12,247 VAD 3 1 0.390 0.342 12,247 Random 3 1 0.420 0.344 12.205 Random 5 1 0.440 0.355 11,981 Random 9 1 0.490 0.406 10,675 Random 3 2 0.430 0.350 12.172 Random 5 2 0.470 0.371 11,787 Random 9 2 0.520 0.429 9,598 Random 3 3 0.450 0.353 12,140 Random 5 3 0.470 0.382 11,698 Random 9 3 0.530 0.448 9,085
. Reproduction of sentences from the corpus. q n is the proportion of sentences generated correctly (bigger is better). q e Percentage of words that were correctly identified as the next word (bigger is better). i mean index of the correct following words in the sorted list of following words (smaller is better). VAD means that p d was determined according to a VAD lexicon, Random expresses that random vectors were determined for the word description.

Verwendet wurde ein Textkorpus mit über 38 Mio. Wörtern. Aus diesem Textkorpus wurden zufällig 100 Sätze der Länge 10 ausgewählt.A text corpus with over 38 million words was used. From this text corpus, 100 sentences of length 10 were randomly selected.

Jeder Satz wurden auf eine Länge von 5 Wörtern gekürzt und alle Sätze mit dem gleichen Anfang aus dem Textkorpus extrahiert.Each sentence was shortened to 5 words in length and all sentences beginning with the same word were extracted from the text corpus.

Anschließend wurde das Satzfragment der Länge 5 zu einem vollständigen Satz unter Verwendung der zuvor genannten Wahrscheinlichkeiten expandiert. Die Auswahlwahrscheinlichkeit wurde nach Anwendung eines Minimum-Operators durch den Wortindex ersetzt. Dadurch werden zuerst seltene Wörter ausgewählt.Then the sentence fragment of length 5 was expanded to a complete sentence using the previously mentioned probabilities. The probability of selection was replaced by the word index after applying a minimum operator. This selects rare words first.

In ist die Quote qn der korrekt erzeugten Sätze, also der Sätze, die genau so im Korpus vorhanden sind, angegeben.In the quota q n of the correctly generated sentences, i.e. the sentences that are exactly as they are in the corpus, is given.

Variiert wurde die Anzahl der verwendeten Wahrscheinlichkeiten lpd | aus {0, 1, 2, 3}. Zudem sind zum Vergleich auch die Ergebnisse bei der Verwendung eines VAD-Lexikons angegeben.The number of probabilities lp d | used was varied from {0, 1, 2, 3}. In addition, the results obtained when using a VAD lexicon are given for comparison.

Außer der Quote qn wurden noch zwei weitere Kennzahlen berechnet. Hierzu werden für jedes Satzfragment sämtliche (aufgrund des Evaluationskorpus) möglichen Folgewörter bestimmt. Es seien ne Folgewörter möglich. Dann bestimmten wir alle möglichen Expansionswörter anhand des Verfahrens und wählten die ne wahrscheinlichsten Wörter aus. Wir berechnen dann den Anteil der Wörter qe, die korrekt als Folgewort bestimmt wurde. Zudem bestimmen wir den normalisierten, mittleren Index i der korrekten Folgewörter in der Liste der durch das Verfahren bestimmten Folgewörter.In addition to the quota q n, two other key figures were calculated. For this purpose, all possible subsequent words (due to the evaluation corpus) are determined for each sentence fragment. There are n e following words possible. Then we determined all possible expansion words using the procedure and chose the n e most likely words. We then calculate the proportion of words q e that were correctly identified as follow-up words. In addition, we determine the normalized, mean index i of the correct subsequent words in the list of subsequent words determined by the method.

Die oben genannten Wahrscheinlichkeiten können für einen gegebenen Satz entsprechend der Leserichtung von links nach rechts oder aber auch entgegengesetzt der Leserichtung von rechts nach links berechnet werden. Auf diese Weise kann ein Satzfragment entweder von links nach rechts oder von rechts nach links vervollständigt werden. Dies kann für die Erzeugung von Antwortsätzen anhand von Schlüsselwörtern wie genutzt werden, wie es bereits in der DE 10 2016 125 162 B4 beschrieben worden war.The above probabilities can be calculated for a given sentence according to the reading direction from left to right or alternatively in the opposite reading direction from right to left. In this way, a sentence fragment can be completed either from left to right or from right to left. This can be used for generating answer sets based on keywords like as already mentioned in the DE 10 2016 125 162 B4 had been described.

Geräte, die auf natürlich sprachliche Eingaben antworten können, sind in vielen Einsatzbereichen verwendbar: Smartphones, Tablets, PCs und sonstige digitale Endgeräte, Autos, Verkaufsautomaten. Auch zur Betreuung von älteren Menschen kann die vorgenannte Technologie genutzt werden.Devices that can respond to natural language input can be used in many areas: smartphones, tablets, PCs and other digital devices, cars, vending machines. The aforementioned technology can also be used to care for older people.

Eine bevorzugte Ausführungsform eines Verfahrens zum maschinellen Verarbeiten eines Textes wird mit folgenden mit Bezug zu 3 knapp beschrieben.A preferred embodiment of a method for machining a text is referred to with the following 3 briefly described.

Das Verfahren besteht grob aus drei Phasen.The process consists roughly of three phases.

In Phase P1 werden die Indizes der Worte bestimmt (Schritt S1), dann werden die „ersten Wahrscheinlichkeiten“ pd bestimmt (Schritt S2), welche auch als „situationsbedingte Wahrscheinlichkeiten“ bezeichnet werden.In phase P1, the indices of the words are determined (step S1), then the “first probabilities” p d are determined (step S2), which are also referred to as “situational probabilities”.

Außerdem können noch eine oder mehrere der beschriebenen Wahrscheinlichkeit bestimmt werden (Schritt S3), wie z.B. die „zweite Wahrscheinlichkeit“, die „dritte Wahrscheinlichkeit“ oder die „vierte Wahrscheinlichkeit“.In addition, one or more of the described probabilities can be determined (step S3), such as the "second probability", the "third probability" or the "fourth probability".

Phase P2 wird auf einen Anfragesatz geantwortet.Phase P2 responds to a query set.

Hierzu wird zunächst der Anfragesatz bereitgestellt (Schritt S4). Wörter, die mit geringer Häufigkeit im Anfragesatz vorkommen, werden aus dem Anfragesatz ausgewählt (Schritt S5).To this end, the query record is first provided (step S4). Words that occur with low frequency in the query sentence are selected from the query sentence (step S5).

Jedes Wort aus dem Anfragesatz wird dann iterativ durch Bestimmen einer Ergänzungswahrscheinlichkeit (Schritt S6.1) zu einem Antwortsatz ergänzt.Each word from the query sentence is then iteratively completed by determining a completion probability (step S6.1) to form an answer sentence.

Die Ergänzungswahrscheinlichkeit wird verwendet, um ein Ergänzungswort zu bestimmen (Schritt S6.2).The complement probability is used to determine a complement word (step S6.2).

Dieses Ergänzungswort ergänzt den Antwortsatz schrittweise (Schritt S6.3), so dass schließlich ein vollständiger Antwortsatz entsteht.This supplementary word completes the answer sentence step by step (step S6.3), so that a complete answer sentence is finally created.

In Phase P3 werden die erzeugten Antwortsätze bewertet (Schritt S7) und dann ein Antwortsatz ausgewählt (Schritt S8).In phase P3, the generated answer sentences are evaluated (step S7) and then an answer sentence is selected (step S8).

Als Bewertungskriterien können, wie bereits ausführlich erläutert, z.B. verwendet werden: die Summe der Wortfolgewahrscheinlichkeiten, die Summe der n-Gramm-Wahrscheinlichkeiten, der Informationsgehalt, auf Basis der Häufigkeiten, mit der die Wörter der jeweiligen Antwortsatzvariante im Text vorkommen, Ähnlichkeit der Antwortsatzvariante zum Anfragesatz oder zu einem Teil des Anfragesatzes.As already explained in detail, the following can be used as evaluation criteria: the sum of the word order probabilities, the sum of the n-gram probabilities, the information content, based on the frequency with which the words of the respective answer sentence variant occur in the text, similarity of the answer sentence variant to the query sentence or to a part of the query sentence.

Ein entsprechendes Verfahren ist in der DE 10 2016 125 162 B4 , dort allerdings ohne Bezug zur erfindungsgemäßen „ersten Wahrscheinlichkeit“, bereits ausführlich beschrieben worden.A corresponding procedure is in DE 10 2016 125 162 B4 , but already described in detail there without reference to the “first probability” according to the invention.

Abschließend sind in den 4A. 4B und 4C drei bevorzugte Ausführungsformen einer Vorrichtung 100, 101, 102 zum maschinellen Verarbeiten von Texten dargestellt. Diese umfassen jeweils einen Speicher 110 und zumindest einen Prozessor 120, wobei die Vorrichtungen 100, 100' jeweils eingerichtet sind, ein Verfahren der vorstehend beschriebenen Art auszuführen.Finally, in the 4A . 4B and 4C show three preferred embodiments of a device 100, 101, 102 for machine processing of texts. These each include a memory 110 and at least one processor 120, with the devices 100, 100' each being set up to carry out a method of the type described above.

Die Ausführungsform 100 nach 4A umfasst eine Eingabeeinrichtung 500, beispielsweise eine Tastatur, ein berührungsempfindliches Display, eine Spracheingabe oder dergleichen, und eine Ausgabeeinrichtung 600, beispielsweise ein Display oder eine Sprachausgabe. Die Vorrichtung 100 ist eingerichtet, auf Eingabe eines Anfragesatzes mittels der Eingabeeinrichtung 500 über die Ausgabeeinrichtung 600 einen Antwortsatz auszugeben, der mittels des vorstehend beschriebenen Verfahrens erzeugt worden ist.The embodiment 100 after 4A comprises an input device 500, for example a keyboard, a touch-sensitive display, a voice input or the like, and an output device 600, for example a display or a voice output. The device 100 is set up to output a response sentence via the output device 600 when a query sentence is input by means of the input device 500, said reply sentence having been generated by means of the method described above.

Die Ausführungsform 101 nach 4B umfasst ein Spracherkennungssystem 200 oder alternativ ein System 300 zur automatischen Übersetzung von Texten.The embodiment 101 after 4B comprises a speech recognition system 200 or alternatively a system 300 for the automatic translation of texts.

Die Vorrichtung 100 ist eingerichtet, auf Basis eines Anfragesatzes, welcher ein von dem Spracherkennungssystem 200 ausgegebenes Satzfragment oder ein von dem System 300 zur automatischen Übersetzung von Texten als partielle automatische Übersetzung ausgegebenes Satzfragment ist, einen Antwortsatz in vorstehend im Detail beschriebener Weise zu erzeugen, welche das jeweilige Satzfragment ergänzt.The device 100 is set up, on the basis of a query sentence, which is a sentence fragment output by the speech recognition system 200 or a sentence fragment output by the system 300 for the automatic translation of texts as a partial automatic translation, to generate a response sentence in the manner described in detail above, which the respective sentence fragment is added.

Mittels dieses Antwortsatzes kann beispielsweise eine Erkennungsgenauigkeit des Spracherkennungssystems 200 oder eine Korrektheit des Systems 300 zur automatischen Übersetzung von Texten verbessert werden, da eine seitens des jeweiligen Systems grundsätzlich betrachtete Menge von Ergänzungswörtern (zur Interpretation von Sprachdaten bzw. zur Übersetzung eines Begriffs) auf Basis der erfindungsgemäß bestimmten Ergänzungswahrscheinlichkeit erheblich eingeschränkt werden kann.This answer set can be used, for example, to improve the recognition accuracy of the speech recognition system 200 or the correctness of the system 300 for automatically translating texts, since a set of supplementary words (for the interpretation of speech data or for the translation of a term) that is fundamentally considered by the respective system is based on the according to the invention certain probability of supplementation can be significantly restricted.

Bei einem Spracherkennungssystem werden Informationen verarbeitet, die z.B. durch ein Mikrophon aufgenommen oder in einer Datei gespeichert wurden. Während der Spracherkennung (wenn ein Teil der Audio-Informationen verarbeitet wurde), kann die Spracherkennung durch das vorgestellte Verfahren verbessert werden. Hierzu wird das bisher Gesagte oder die bisher verarbeiteten Audio-Informationen als Antwortsatzfragment betrachtet, den es zu ergänzen gilt. Das hier vorgestellte Verfahren stellt für dieses Antwortsatzfragment eine Reihe von möglichen Ergänzungswörtern bereit. Bei der Erkennung von gesprochener Sprache gibt es evtl. alternative Interpretationsmöglichkeiten. Durch die vom Verfahren bereitgestellten Ergänzungswörter können die alternativen Interpretationsmöglichkeiten eingeschränkt werden. Damit kann die Erkennungsrate verbessert werden. Die Wahrscheinlichkeit der Interpretationsmöglichkeit kann erhöht werden, wenn das entsprechende Ergänzungswort aufgrund des hier vorgestellten Verfahrens „vorhanden ist“, d.h. eine positive Ergänzungswahrscheinlichkeit aufweist. Somit werden Sätze, die aufgrund der Datenbasis erzeugbar sind, mit höherer Wahrscheinlichkeit erkannt.In a speech recognition system, information is processed which, for example, was recorded by a microphone or stored in a file. During speech recognition (when part of the audio information has been processed), speech recognition can be improved using the method presented. For this purpose, what has been said so far or the audio information processed so far is regarded as an answer sentence fragment that needs to be supplemented. The method presented here provides a number of possible supplementary words for this answer sentence fragment. When recognizing spoken language, there may be alternative interpretation options. The alternative interpretation possibilities can be limited by the supplementary words provided by the procedure. This can improve the recognition rate. The probability of the possibility of interpretation can be increased if the corresponding supplementary word "is available" based on the procedure presented here, i.e. it has a positive supplementary probability. Thus, sentences that can be generated on the basis of the database are more likely to be recognized.

Zudem kann eine sprecherunabhängige Erkennung gefördert werden. Es muss nun nämlich nicht mehr der Inhalt der gesprochenen Sprache erkannt werden. Vielmehr ist es ausreichend festzustellen, welchem der Ergänzungswörter die folgenden Audio-Informationen am ehesten entsprechen.In addition, speaker-independent recognition can be promoted. It is no longer necessary to recognize the content of the spoken language. Rather, it is sufficient to determine which of the supplementary words the following audio information most closely corresponds to.

Eine Unterscheidung zwischen Wortalternativen (den Ergänzungswörtern) ist also ausreichend.A distinction between word alternatives (the supplementary words) is therefore sufficient.

Die Verbesserung von Übersetzungssystemen funktioniert analog. Bei einem Übersetzungssystem kann der bisher übersetzte Text als Antwortsatzfragment betrachtet werden. Vom Übersetzungssystem stehen evtl. alternative Wörter bereit, um den bisher erzeugten Satz fortzusetzen. Es werden dann die Auswahlwahrscheinlichkeiten der Wörter der Zielsprache erhöht, die vom hier vorgestellten Verfahren als Ergänzungswörter vorgeschlagen werden. Somit wird die Qualität der Übersetzung verbessert, da die Datenbasis als Grundlage für die Übersetzung dient.Improving translation systems works analogously. In a translation system, the text translated so far can be viewed as an answer sentence fragment. Alternative words may be available from the translation system to continue the sentence generated so far. The selection probabilities of the words in the target language that are suggested as supplementary words by the method presented here are then increased. This improves the quality of the translation, since the database serves as the basis for the translation.

Die Vorrichtung 100 kann zusätzlich, mittels einer Vergleichseinrichtung (nicht gezeigt), automatisch den erzeugten Antwortsatz mit dem Anfragesatz nach vorgegebenen Regeln vergleichen, beispielsweise hinsichtlich syntaktischer und/oder semantischer Ähnlichkeit. The device 100 can additionally, by means of a comparison device (not shown), automatically compare the response set generated with the query set according to predefined rules, for example with regard to syntactic and/or semantic similarity.

Die dritte Ausführungsform 102 nach 4C umfasst ebenfalls eine vorstehend beschriebene Eingabeeinrichtung 500, die zum Eingeben zumindest eines Teils des Anfragesatzes durch einen Nutzer der Vorrichtung eingerichtet ist. Die Vorrichtung 102 umfasst auch eine vorstehend beschriebene Ausgabeeinrichtung 600, die zum Ausgeben einer Mehrzahl von Ergänzungswörtern eingerichtet ist, welche im Rahmen der Erzeugung eines Antwortsatzes oder einer Antwortsatzvariante bestimmt worden sind, beispielsweise ein Display oder eine Sprachausgabe. Weiterhin umfasst die Vorrichtung 102 eine Auswahleinrichtung 700, mittels welcher der Nutzer ein Ergänzungswort aus der Mehrzahl der ausgegebenen Ergänzungswörter zum Ergänzen des Antwortsatzes oder der Antwortsatzvariante auswählen kann. Die Auswahleinrichtung 700 kann mit der Eingabeeinrichtung 500 kombiniert sein. Genauso kann, wie in der Figur gezeigt, ein berührungsempfindliches Display als kombinierte Ein- und Ausgabeeinrichtung 500, 600 dienen.The third embodiment 102 after 4C also includes an input device 500 as described above, which is set up for a user of the device to input at least part of the query record. The device 102 also includes an output device 600 as described above, which is set up to output a plurality of supplementary words which have been determined as part of the generation of an answer sentence or an answer sentence variant, for example a display or a voice output. Furthermore, the device 102 includes a selection device 700, by means of which the user can select a supplementary word from the plurality of supplementary words output to supplement the answer sentence or the answer sentence variant. The selection device 700 can be combined with the input device 500 . Likewise, as shown in the figure, a touch-sensitive display can serve as a combined input and output device 500, 600.

ZITATE ENTHALTEN IN DER BESCHREIBUNGQUOTES INCLUDED IN DESCRIPTION

Diese Liste der vom Anmelder aufgeführten Dokumente wurde automatisiert erzeugt und ist ausschließlich zur besseren Information des Lesers aufgenommen. Die Liste ist nicht Bestandteil der deutschen Patent- bzw. Gebrauchsmusteranmeldung. Das DPMA übernimmt keinerlei Haftung für etwaige Fehler oder Auslassungen.This list of documents cited by the applicant was generated automatically and is included solely for the better information of the reader. The list is not part of the German patent or utility model application. The DPMA assumes no liability for any errors or omissions.

Zitierte PatentliteraturPatent Literature Cited

  • US 7562005 [0003]US 7562005 [0003]
  • US 20020116173 A1 [0003]US20020116173A1 [0003]
  • US 20140149107 A1 [0005]US20140149107A1 [0005]
  • US 9424254 [0005]US9424254 [0005]
  • DE 102016125162 B4 [0006, 0013, 0022, 0081, 0190, 0203]DE 102016125162 B4 [0006, 0013, 0022, 0081, 0190, 0203]

Claims (15)

Verfahren zum maschinellen Verarbeiten eines Textes, umfassend die Schritte: - Erfassen und Speichern des Textes, wobei jedem erfassten Wort ein Wert zugeordnet wird; - Für eine Sequenz des Textes und für ein Wort der Sequenz: Bestimmen (S1) einer ersten Wahrscheinlichkeit, mit der das Wort in der Sequenz in Kombination mit einem Zustand vorkommt, der sich aus den Werten von in der Sequenz zu dem Wort benachbarten Worten berechnet.A method for processing a text, comprising the steps of: - capturing and storing the text, assigning a value to each captured word; - For a sequence of text and for a word of the sequence: Determining (S1) a first probability with which the word occurs in the sequence in combination with a state that is calculated from the values of words in the sequence that are adjacent to the word. Verfahren nach Anspruch 1, wobei der Wert eines Wortes durch einen ein- oder mehrdimensionalen Vektor repräsentiert wird, und wobei der mit Bezug zu den benachbarten Worten berechnete Zustand mittels Addition der den benachbarten Worten zugeordneten Werte berechnet wird.procedure after claim 1 , where the value of a word is represented by a one or more dimensional vector, and where the state calculated with respect to the neighboring words is calculated by adding the values assigned to the neighboring words. Verfahren nach Anspruch 2, wobei der Vektor ein k-dimensionaler Vektor ist, wobei k eine natürliche Zahl ist, und wobei jede Komponente des Vektors zumindest b diskrete Werte annehmen kann, wobei b eine natürliche Zahl ist.procedure after claim 2 , where the vector is a k-dimensional vector, where k is a natural number, and where each component of the vector can take on at least b discrete values, where b is a natural number. Verfahren nach Anspruch 2 oder 3, wobei der Vektor eine Beschreibung des Wortes gemäß einer empirisch gewählten Klassifikation umfasst, beispielsweise in Form eines VAD-Vektors, oder wobei der Vektor einem Zufallsvektor entspricht.procedure after claim 2 or 3 , where the vector comprises a description of the word according to an empirically chosen classification, for example in the form of a VAD vector, or where the vector corresponds to a random vector. Verfahren nach einem der Ansprüche 1 bis 4, wobei die Sequenz einen oder mehrere Sätze des Textes umfasst, und wobei die benachbarten Worte in der Sequenz in Leserichtung vor dem Wort angeordnet sind oder wobei die benachbarten Worte in der Sequenz in Leserichtung nach dem Wort angeordnet sind.Procedure according to one of Claims 1 until 4 , wherein the sequence comprises one or more sentences of the text, and wherein the adjacent words are arranged in the sequence in the reading order before the word or wherein the adjacent words are arranged in the sequence after the word in the reading order. Verfahren nach einem der Ansprüche 2 bis 5, wobei die erste Wahrscheinlichkeit, mit der das Wort in der Sequenz in Kombination mit dem Zustand vorkommt, auf Basis des Wertes des Wortes im Vergleich zu dem Zustand berechnet wird.Procedure according to one of claims 2 until 5 , where the first probability that the word occurs in the sequence in combination with the state is calculated based on the value of the word compared to the state. Verfahren nach einem der Ansprüche 1 bis 6, umfassend die weiteren Schritte: - für jedes erfasste Wort: Bestimmen eines Häufigkeitswerts, welcher repräsentiert, wie häufig dieses Wort in dem Text im Vergleich zu anderen Wörtern des Textes vorkommt; - Für einen Satz des Textes und für ein Wort des Satzes: Bestimmen und Speichern (S3) einer zweiten Wahrscheinlichkeit, mit der das Wort in dem Satz in Kombination mit einem ersten Tupel von Wörtern vorkommt, wobei das erste Tupel, - zumindest zwei Wörter umfasst, welche beim Durchlaufen des Satzes vor dem Wort angeordnet sind; - wobei zumindest ein erstes der zumindest zwei Wörter im Vergleich zu anderen in dem Satz bereits durchlaufenen Wörtern in dem Text mit geringerer Häufigkeit auftritt; und - wobei zumindest ein zweites der zumindest zwei Wörter in dem Satz in einer vorgegebenen Umgebung des Wortes angeordnet ist, und/oder Bestimmen und Speichern (S3) einer vierten Wahrscheinlichkeit, mit der das Wort in dem Satz in Kombination mit einem zweiten Tupel von Wörtern vorkommt, wobei das zweite Tupel - zumindest zwei Wörter umfasst, welche beim Durchlaufen des Satzes vor dem Wort angeordnet sind; - wobei zumindest ein erstes der zumindest zwei Wörter im Vergleich zu anderen in dem Satz bereits durchlaufenen Wörtern in dem Text mit geringerer Häufigkeit auftritt; - wobei zumindest ein zweites der zumindest zwei Wörter in dem Satz in einer vorgegebenen Umgebung des Wortes angeordnet ist, und - wobei das zweite Tupel sich vom dem ersten Tupel bezüglich des zumindest einen ersten Wortes und/oder bezüglich des zumindest einen zweiten Wortes unterscheidet.Procedure according to one of Claims 1 until 6 , comprising the further steps: - for each detected word: determining a frequency value which represents how often this word occurs in the text compared to other words in the text; - For a sentence of the text and for a word of the sentence: determining and storing (S3) a second probability with which the word occurs in the sentence in combination with a first tuple of words, the first tuple comprising at least two words , which are placed before the word when traversing the sentence; - wherein at least a first of the at least two words occurs with a lower frequency in the text compared to other words already traversed in the sentence; and - wherein at least a second of the at least two words in the sentence is located in a predetermined neighborhood of the word, and/or determining and storing (S3) a fourth probability with which the word in the sentence in combination with a second tuple of words occurs, wherein the second tuple - comprises at least two words which are placed before the word when traversing the sentence; - wherein at least a first of the at least two words occurs with a lower frequency in the text compared to other words already traversed in the sentence; - wherein at least a second of the at least two words in the sentence is arranged in a predetermined environment of the word, and - wherein the second tuple differs from the first tuple with regard to the at least one first word and/or with regard to the at least one second word. Verfahren nach einem der Ansprüche 1 bis 7, umfassend den weiteren Schritt: Bestimmen und Speichern (S3) einer dritten Wahrscheinlichkeit, mit der das Wort beim Durchlaufen des Satzes auf eine Sequenz von aufeinanderfolgenden Wörtern folgt, die durch eine vorgegebene Anzahl von dem Wort vorhergehenden Wörtern bestimmt ist, in dem Satz oder in einem an den Satz angrenzenden Satz.Procedure according to one of Claims 1 until 7 , comprising the further step: determining and storing (S3) a third probability with which the word follows a sequence of consecutive words, which is determined by a predetermined number of words preceding the word, in the sentence or in a sentence adjacent to the sentence. Verfahren nach einem der Ansprüche 1 bis 8, umfassend die weiteren Schritte: - Bereitstellen (S4) eines Anfragesatzes; - Auswählen (S5) einer vorgegebenen Anzahl von Wörtern aus dem Anfragesatz, wobei die ausgewählten Wörter in dem Text vorkommen und im Vergleich zu nicht ausgewählten Wörtern des Anfragesatzes, welche ebenfalls in dem Text vorkommen, in dem Text mit einer geringeren Häufigkeit auftreten; - Bestimmen (S6.1) einer Ergänzungswahrscheinlichkeit zum Bestimmen (S6.2) eines Ergänzungswortes; - auf Basis der ersten Wahrscheinlichkeit, oder - auf Basis der ersten Wahrscheinlichkeit in Kombination mit zumindest einer aus der zweiten Wahrscheinlichkeit, der dritten Wahrscheinlichkeit und der vierten Wahrscheinlichkeit; - Für zumindest eines der ausgewählten Wörter: Erzeugen (S6) eines Antwortsatzes, ausgehend von dem ausgewählten Wort, auf Basis der bestimmten Ergänzungswahrscheinlichkeit, mittels der folgenden Teilschritte: - Bestimmen (S6.2) eines Ergänzungswortes aus dem Text, wobei das Ergänzungswort aus einer Menge vorgegebener Größe von potentiellen Ergänzungswörtern ausgewählt wird, welche aus denjenigen potentiellen Ergänzungswörtern besteht, die mit Bezug zu einer vorgegebenen Durchlaufrichtung mit Bezug zu dem Antwortsatz die höchsten Ergänzungswahrscheinlichkeiten aufweisen. - Ergänzen (S6.2) des Antwortsatzes in Durchlaufrichtung um das Ergänzungswort.Procedure according to one of Claims 1 until 8th , comprising the further steps: - providing (S4) a query set; - selecting (S5) a predetermined number of words from the query sentence, the selected words occurring in the text and compared to non-selected words of the query sentence, wel che also appear in the text appear in the text with a lower frequency; - determining (S6.1) a complement probability for determining (S6.2) a complement word; - based on the first probability, or - based on the first probability in combination with at least one of the second probability, the third probability and the fourth probability; - For at least one of the selected words: Generating (S6) an answer sentence, starting from the selected word, on the basis of the determined completion probability, by means of the following sub-steps: - Determining (S6.2) a complementary word from the text, the complementary word consisting of a Set of predetermined size of potential supplementary words is selected, which consists of those potential supplementary words that have the highest supplementary probabilities in relation to a predetermined flow direction with respect to the answer set. - Supplementing (S6.2) the answer sentence in the flow direction with the supplementary word. Verfahren nach Anspruch 9, wobei zum Erzeugen des Antwortsatzes die Schritte des Bestimmens eines Ergänzungswortes und des Ergänzens des Antwortsatzes wiederholt werden, bis das Ergänzungswort als ein Satzabschlusswort erkannt wird, wobei die Schritte des Bestimmens eines Ergänzungswortes und des Ergänzens des Antwortsatzes in Bezug auf verschiedene Durchlaufrichtungen erfolgen können.procedure after claim 9 , wherein to generate the answer sentence, the steps of determining a supplementary word and completing the answer sentence are repeated until the supplementary word is recognized as a sentence terminating word, wherein the steps of determining a supplementary word and completing the answer sentence can take place with respect to different traversal directions. Verfahren nach einem der Ansprüche 9 bis 10, wobei ausgehend von einem ausgewählten Wort eine Mehrzahl von Antwortsatzvarianten dadurch gebildet werden, dass der Antwortsatz jeweils durch ein Ergänzungswort aus der Menge vorgegebener Größe von potentiellen Ergänzungswörtern ergänzt wird.Procedure according to one of claims 9 until 10 , starting from a selected word, a plurality of answer sentence variants are formed in that the answer sentence is each supplemented by a supplementary word from the set of predetermined size of potential supplementary words. Verfahren nach Anspruch 11, umfassend die weiteren Schritte: Bewerten (S7) der Antwortsatzvarianten mittels zumindest eines der nachfolgenden Bewertungskriterien: - Summe der Wortfolgewahrscheinlichkeiten; - Summe der n-Gramm-Wahrscheinlichkeiten; - Informationsgehalt, auf Basis der Häufigkeiten, mit der die Wörter der jeweiligen Antwortsatzvariante im Text vorkommen; - Ähnlichkeit der Antwortsatzvariante zum Anfragesatz oder zu einem Teil des Anfragesatzes, und Auswählen (S8) zumindest eines Antwortsatzes aus den Antwortsatzvarianten auf Basis der Bewertung.procedure after claim 11 , comprising the further steps: evaluating (S7) the answer sentence variants using at least one of the following evaluation criteria: - sum of the word order probabilities; - sum of n-gram probabilities; - Information content, based on the frequency with which the words of the respective answer sentence variant occur in the text; - Similarity of the answer sentence variant to the query sentence or to a part of the query sentence, and selecting (S8) at least one answer sentence from the answer sentence variants on the basis of the evaluation. Vorrichtung (100; 101; 102) zum maschinellen Verarbeiten eines Textes, umfassend zumindest einen Speicher (110) und zumindest einen Prozessor (120), wobei die Vorrichtung eingerichtet ist, ein Verfahren nach einem der Ansprüche 1 bis 12 auszuführen.Device (100; 101; 102) for machine processing of a text, comprising at least one memory (110) and at least one processor (120), wherein the device is set up, a method according to one of Claims 1 until 12 to execute. Vorrichtung (101) nach Anspruch 13, umfassend ein Spracherkennungssystem (200) oder ein System (300) zur automatischen Übersetzung von Texten, wobei die Vorrichtung eingerichtet ist, auf Eingabe eines Anfragesatzes, welcher ein von dem Spracherkennungssystem (200) ausgegebenes Satzfragment auf Basis einer teilweise verarbeiteten Spracheingabe oder ein von dem System (300) zur automatischen Übersetzung von Texten als automatische partielle Übersetzung ausgegebenes Satzfragment ist, einen Antwortsatz zu erzeugen, welcher das jeweilige Satzfragment ergänzt, so dass eine Erkennungsgenauigkeit des Spracherkennungssystems (200) oder eine Korrektheit des System (300) zur automatischen Übersetzung von Texten verbessert werden kann, indem eine Menge seitens des Spracherkennungssystems (200) oder des Systems (300) zur automatischen Übersetzung von Texten herangezogenen Ergänzungswörtern auf Basis der Ergänzungswahrscheinlichkeit eingeschränkt wird.Device (101) according to Claim 13 , comprising a speech recognition system (200) or a system (300) for the automatic translation of texts, wherein the device is set up, upon input of a query sentence, which is a sentence fragment output by the speech recognition system (200) on the basis of a partially processed speech input or one of the System (300) for the automatic translation of texts as an automatic partial translation output sentence fragment is to generate an answer sentence, which supplements the respective sentence fragment, so that a recognition accuracy of the speech recognition system (200) or a correctness of the system (300) for the automatic translation of texts can be improved by restricting a set of complement words used by the speech recognition system (200) or the system (300) for the automatic translation of texts on the basis of the complement probability. Vorrichtung (102) nach Anspruch 13 oder 14, weiter umfassend eine Eingabeeinrichtung (500) zum Eingeben zumindest eines Teils des Anfragesatzes durch einen Nutzer, und eine Ausgabeeinrichtung (600) zum Ausgeben einer Mehrzahl von Ergänzungswörtern, welche im Rahmen der Erzeugung eines Antwortsatzes oder einer Antwortsatzvariante bestimmt worden sind, weiter umfassend eine Auswahleinrichtung (700), mittels welcher der Nutzer ein Ergänzungswort aus der Mehrzahl der Ergänzungswörter zum Ergänzen des Antwortsatzes oder der Antwortsatzvariante auswählen kann.device (102). Claim 13 or 14 , further comprising an input device (500) for entering at least part of the query sentence by a user, and an output device (600) for outputting a plurality of supplementary words which have been determined during the generation of an answer sentence or an answer sentence variant, further comprising a selection device (700), by means of which the user can select a supplementary word from the plurality of supplementary words for supplementing the answer sentence or the answer sentence variant.
DE102021006511.5A 2021-12-27 2021-12-27 Method and device for machine processing of texts Pending DE102021006511A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
DE102021006511.5A DE102021006511A1 (en) 2021-12-27 2021-12-27 Method and device for machine processing of texts

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE102021006511.5A DE102021006511A1 (en) 2021-12-27 2021-12-27 Method and device for machine processing of texts

Publications (1)

Publication Number Publication Date
DE102021006511A1 true DE102021006511A1 (en) 2023-06-29

Family

ID=86693743

Family Applications (1)

Application Number Title Priority Date Filing Date
DE102021006511.5A Pending DE102021006511A1 (en) 2021-12-27 2021-12-27 Method and device for machine processing of texts

Country Status (1)

Country Link
DE (1) DE102021006511A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020116173A1 (en) 2000-12-11 2002-08-22 International Business Machine Corporation Trainable dynamic phrase reordering for natural language generation in conversational systems
US7562005B1 (en) 2000-01-18 2009-07-14 At&T Intellectual Property Ii, L.P. System and method for natural language generation
US20140149107A1 (en) 2012-11-29 2014-05-29 Frank Schilder Systems and methods for natural language generation
US9424254B2 (en) 2012-11-29 2016-08-23 Thomson Reuters Global Resoures Systems and methods for natural language generation
DE102016125162B4 (en) 2016-12-05 2018-07-26 Ernst-Moritz-Arndt-Universität Greifswald Method and device for the automatic processing of texts

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7562005B1 (en) 2000-01-18 2009-07-14 At&T Intellectual Property Ii, L.P. System and method for natural language generation
US20020116173A1 (en) 2000-12-11 2002-08-22 International Business Machine Corporation Trainable dynamic phrase reordering for natural language generation in conversational systems
US20140149107A1 (en) 2012-11-29 2014-05-29 Frank Schilder Systems and methods for natural language generation
US9424254B2 (en) 2012-11-29 2016-08-23 Thomson Reuters Global Resoures Systems and methods for natural language generation
DE102016125162B4 (en) 2016-12-05 2018-07-26 Ernst-Moritz-Arndt-Universität Greifswald Method and device for the automatic processing of texts

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
KÖPER, Maximilian; IM WALDE, Sabine Schulte. Automatically generated affective norms of abstractness, arousal, imageability and valence for 350 000 german lemmas. In: Proceedings of the Tenth International Conference on Language Resources and Eva-luation (LREC'16). 2016. S. 2595-2598. [https://aclanthology.org/L16-1413.pdf]
LI, Minglei, et al. Inferring affective meanings of words from word embedding. IEEE Trans. on Affective Computing Vol. 8, 2017 (4) 443-456. DOI: 10.1109/TAFFC.2017.2723012
LI, Minglei; LONG, Yunfei; LU, Qin. A regression approach to valence-arousal ratings of words from word embedding. In: 2016 International Conference on Asian Language Processing (IALP). IEEE, 2016. S. 120-123. DOI: 10.1109/IALP.2016.7875949

Similar Documents

Publication Publication Date Title
DE102020205786B4 (en) SPEECH RECOGNITION USING NLU (NATURAL LANGUAGE UNDERSTANDING) RELATED KNOWLEDGE OF DEEP FORWARD NEURAL NETWORKS
DE112014006542B4 (en) Setup and process for understanding user intent
DE60033733T2 (en) Database query system based on speech recognition
EP0925578B1 (en) Speech-processing system and method
EP1168298B1 (en) Method of assembling messages for speech synthesis
DE60032193T2 (en) Method and system for selecting recognized words when correcting recognized speech
DE112018002601T5 (en) PROCESSING NATURAL LANGUAGE USING CONTEXT-SPECIFIC WORD VECTORS
DE69530816T2 (en) Text editing system and method using a knowledge base
EP3652664A1 (en) Method for conducting dialog between human and computer
EP0702353B1 (en) System and method for outputting synthetic speech in response to input speech signals
DE112017006151T5 (en) Customizable processing components
DE102008040739A1 (en) Method and system for calculating or determining confidence or confidence scores for syntax trees at all levels
DE102018113034A1 (en) VOICE RECOGNITION SYSTEM AND VOICE RECOGNITION METHOD FOR ANALYZING A COMMAND WHICH HAS MULTIPLE INTENTIONS
DE112013005742T5 (en) Intention estimation device and intention estimation method
DE102019004300A1 (en) USE OF A DYNAMIC STORAGE NETWORK TO TRACK DIGITAL DIALOG STATES AND GENERATE ANSWERS
EP3798922A1 (en) Device and method for machine learning and controlling a machine
DE102013224331A1 (en) System and method for providing predictive queries
EP0285222A2 (en) Method for detecting associatively pronounced words
DE602004003609T2 (en) Solution of segmentation ambiguity in grammatical position
DE102020215954A1 (en) DIALOGUE SYSTEM AND PROCEDURE FOR CONTROLLING THESE
DE102021006511A1 (en) Method and device for machine processing of texts
DE102016125162B4 (en) Method and device for the automatic processing of texts
EP1136982A2 (en) Generation of a language model and an acoustic model for a speech recognition system
EP1184838B1 (en) Phonetic transcription for speech synthesis
DE60119643T2 (en) Homophone choice in speech recognition

Legal Events

Date Code Title Description
R012 Request for examination validly filed
R016 Response to examination communication