Category : nlp

Obesity has become a global problem, and weight loss has always been a slogan easy to shout but difficult to practice. Many artificial intelligence companies use big data, machine learning, computer vision and other technologies to help the vast number of “fat friends” keep their mouths shut and their legs open while offering personalized slimming ..

Read more

Introduction: In the first two articles, we introduced the application background of NLP technology in Yixin-“agile AI | NLP technology practice in Yixin business [background article]” and one of the application scenarios, “agile AI | NLP technology practice in Yixin business [intelligent chat robot article]”. This is another scene, that is, how to build customer ..

Read more

Order This article mainly studies how to use opennlp to customize named entities, label training and model application. maven <dependency> <groupId>org.apache.opennlp</groupId> <artifactId>opennlp-tools</artifactId> <version>1.8.4</version> </dependency> Practice Training model // train the name finder String typedEntities = “<START:organization> NATO <END>\n” + “<START:location> United States <END>\n” + “<START:organization> NATO Parliamentary Assembly <END>\n” + “<START:location> Edinburgh <END>\n” + “<START:location> ..

Read more

Order This paper mainly sorts out the architecture and process of NLP system. NLP architecture This picture comes from[Legislative Science Popularization: A Brief Introduction to the Architecture of Natural Language System] Main process steps Dividing/cutting words (Tokenization) Part of speech tagging (POS Tagging) Semantic chunk (Chunking) Named entity annotations (Named Entity Tagging) The first few ..

Read more

Order This paper mainly studies how Naive Bayesian algorithm classifies text. Bayesian algorithm Bayesian method converts the probability of “belonging to a certain type under certain characteristics” into the probability of “belonging to a certain type under certain characteristics”, which belongs to supervised learning. 后验概率 = 先验概率 x 调整因子 This is the meaning of Bayesian inference. We ..

Read more

Order This paper mainly studies how to use stanford nlp for dependency parsing maven <dependency> <groupId>edu.stanford.nlp</groupId> <artifactId>stanford-corenlp</artifactId> <version>3.9.1</version> </dependency> LexicalizedParser Lexical is the meaning of words, LexicalizedParser is the grammatical analysis of words. @Test public void testLexicalizedParser() throws IOException { LexicalizedParser lp = LexicalizedParser.loadModel(this.getClass().getClassLoader().getResource(“xinhuaFactoredSegmenting.ser.gz”).getPath()); List<String> lines = Arrays.asList(“小明喜欢吃香蕉”); lines.stream().forEach(sentence -> { Tree tree = lp.parse(sentence); ..

Read more

Order This paper mainly studies how to use opennlp to tag part of speech. POS Tagging Part of Speech, POS) is the process of describing a word or a paragraph of text. This description is called a label. At present, there are two types of popular Chinese POS tags: the North POS tag set and ..

Read more

Order This paper mainly studies how to use opennlp to classify documents. DoccatModel To classify documents, a maximum entropy model (Maximum Entropy Model), corresponding to DoccatModel in opennlp. @Test public void testSimpleTraining() throws IOException { ObjectStream<DocumentSample> samples = ObjectStreamUtils.createObjectStream( new DocumentSample(“1”, new String[]{“a”, “b”, “c”}), new DocumentSample(“1”, new String[]{“a”, “b”, “c”, “1”, “2”}), new DocumentSample(“1”, ..

Read more

Order This paper mainly studies how to use opennlp to analyze dependency syntax Parser Opennlp mainly uses Parser for dependency parsing, and its model is ParserModel. @Test public void testParserTool() throws IOException { try (InputStream modelInputStream = this.getClass().getClassLoader().getResourceAsStream(“chunker/en-parser-chunking.bin”)) { ParserModel model = new ParserModel(modelInputStream); Parser parser = ParserFactory.create(model); String sentence = “The cow jumped over ..

Read more