AI Series Essays: Syntaxnet Exploration (1)

Source: Internet
Author: User

Ai is a more recent fire of the term, I believe you are not familiar with the alpha dog? In fact, I am also very resistant to artificial intelligence, because I think the robot will replace human beings, become the world and even the supremacy of the universe, but the artificial intelligence brought me this impact, I personally feel is addictive, into the topic, online find an artificial intelligence framework, its name is called Syntaxnet, Interested can go to see, the bottom is implemented in C + +.

Because artificial intelligence is a relatively new noun, even my own contact is very few, so it can only take everyone to explore, if the garden has artificial intelligence in Daniel, but also hope that a lot of advice.

Syntaxnet's official explanation is: An ordered neural network model. It has another strange name, called:TensorFlow. the description of the model implemented by TensorFlow can be found here; Google spends a lot of time studying how to make machines smarter about learning human languages and learning human languages faster.

There is a need to go to science tensorflow, I just checked the next; The official explanation is that TensorFlow is an open-source, numerical-computing class library using data flow diagrams. The node in the graph presents a variety of different mathematical operations and so on ... The rest is not translated, there is interest can Google a bit. In fact, my foreign language is not very good, you are sorry, translate what, slowly come.

Training model

In the following tutorial, I will show you how to train the model and introduce more things related to NPL; The focus is on the NPL pipeline.

Part-of-speech labeling device

Consider the following sentence, it has a lot of different meanings;I saw the man with glasses the sentences above consist of the following parts:

Different strings can be divided into the following groups: For example: "I", "Saw", "the" is 3 groups, the delimiter is a space, each word has their different meanings, everyone learned English people know, English sometimes a word has 10 meaning, and this meaning in different contexts of meaning are different , for example, the saw in this is the past, but it has been mentioned that different words in different contexts have different meanings, such as saw in some cases can be used as a noun, or it may be present, the above-mentioned need a little English basis.

If you want to understand the meaning of different words, first of all you need to know the different words in this sentence play different roles, this process is called Part-of-speech (POS) Tagging, that is, part-of-speech tagging, these roles are called Pos Tags, Although a word may have a different context for this sentence, for any word that makes up a sentence, when their semantics are grouped together, the number of tags tends to be significantly reduced, which is generally a meaning.

For POS tagging, it is a very challenging thing to define a verb in a sentence. When verbs and nouns are very similar in meaning, it is extremely difficult for any language to define verbs or nouns. The purpose of Universal Dependencies is to solve this problem, interested can be opened to see.

Training Syntaxnet POS Tagger

To get the correct tag for all the words in this sentence, we first have to let the machine understand the exact meaning of the sentence in the current context. Here we can use a sentence of the nearest principle to analyze, such as I saw the man with glasses, saw the front is i,saw behind is the; For example, the back of the, is usually a noun or an adjective, rather than a verb.

In order to achieve the purpose of estimating what meaning, generally use the following steps: From left to right. We first put all the adjacent words of this sentence together, and then calculate these meanings, and then sent to the neural network classifier Feedforward, used to analyze POS tags in different contexts of different meanings. Because we are in order from left to right, so the next word meaning, it may be the meaning of the previous or a few words to judge, such as I saw the man with glasses, saw if it is determined to be a verb, the is certainly not a verb, Man in the sentence meaning or grammatical function, is certainly the front of the to modify, so the following words even if there are different meanings, but also by the preceding words, to be screened.

All the models in this package use a flexible markup language to define features. For example Pos Tag, with Parameters brain_pos_features in Taskspec, looks like this:

Stack (3). Word stack (2). Word stack (1). Word stack.word Input.word input (1). Word input (2). Word input (3). Word;input.digit Input.hyphen;stack.suffix (length=2) input.suffix (length=2) input (1). suffix (length=2); Stack.prefix (length=2) Input.prefix (length=2) input (1). prefix (length=2)

It means that the stack word has been tagged. So, in detail, there are 3 different types for this function: words, suffixes, and prefixes. So it's more like an embedded matrix, just as there's a table in the table, in series, in a list of hidden layers.

Let's give you a sneak peek at the picture below!

Please wait ~ ~ ~ ~ ~

  

AI Series Essays: Syntaxnet Exploration (1)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.