# Median of Two Sorted Arrays (LeetCode 4)

There are two sorted arrays nums1 and nums2 of size m and n respectively.

Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).

You may assume nums1 and nums2 cannot be both empty.

# Statistical Parsing Note (SLP Ch12)

One crucial use of probabilistic parsing is to solve the problem of disambiguation. CYK only represent them.

Probabilistic context-free grammar (PCFG) is the most commonly used probabilistic grammar formalism. Ways that improve PCFGs trained on Treebank grammars:

• change the names of the non-terminals (sometimes more specific and sometimes more general)
• adding more sophisticated conditioning factors, extending PCFGs to handle probabilistic subcategorization information and probabilistic lexical dependencies

Heavily lexicalized grammar formalisms:

• Lexical-Functional Grammar (LFG) Bresnan, 1982
• Head-Driven Phrase Structure Grammar (HPSG) Pollard and Sag, 1994
• Tree-Adjoining Grammar (TAG) Joshi, 1985
• Combinatory Categorial Grammar (CCG)

# XLNet, Generalized Autoregressive Pretraining for Language Understanding Note

zihangdai/xlnet: XLNet: Generalized Autoregressive Pretraining for Language Understanding

## Abstract

BERT 忽略了屏蔽位置之间的依赖关系，会有预训练和 Fine-tuning 效果的差异。

XLNet：

• 通过最大化因式分解顺序所有可能排列的对数似然，学习双向语境信息。
• 依靠自回归克服了 BERT 的缺点。

# Longest Substring Without Repeating Characters (LeetCode 3)

Given a string, find the length of the longest substring without repeating characters.

# 《Elasticsearch 权威指南》之基础入门 Note（基于 7.x）

## 为了搜索

Elasticsearch 建立在 Lucene 上，它不仅仅是一个全文搜索引擎：

• 一个分布式的实时文档存储，每个字段 可以被索引与搜索
• 一个分布式实时分析搜索引擎
• 能胜任上百个服务节点的扩展，并支持 PB 级别的结构化或者非结构化数据

Install Elasticsearch with Docker | Elasticsearch Reference [7.2] | Elastic

• docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.2.0
• curl http://127.0.0.1:9200/_cat/health

• curl 'http://localhost:9200/?pretty'

Running Kibana on Docker | Kibana User Guide [7.2] | Elastic

• docker run --link YOUR_ELASTICSEARCH_CONTAINER_NAME_OR_ID:elasticsearch -p 5601:5601 {docker-repo}:{version}

• http://localhost:5601

# Syntactic Parsing Note (SLP Ch11)

This chapter focuses on the structures assigned by context-free grammars. Context-free grammars don’t specify how the parse tree for a given sentence should be computed. We therefore need to specify algorithms that employ these grammars to efficiently produce correct trees. They are useful in applications such as grammar checking, semantic analysis, question answering and information extraction.

# Formal Grammars of English Note (SLP Ch10)

This chapter is devoted to the topic of context-free grammars. They are integral to many computational applications, including grammar checking, semantic interpretation, dialogue understanding, and machine translation.