The Rust Programming Language Brief Note (Vol2-Manage)

## 7 Managing Growing Projects with Packages Crates and Modules

In addition to grouping functionality, encapsulating implementation details lets you reuse code at a higher level: once you’ve implemented an operation, other code can call that code via the code’s public interface without knowing how the implementation works. The way you write code defines which parts are public for other code to use and which parts are private implementation details that you reserve the right to change. This is another way to limit the amount of detail you have to keep in your head.

  • Packages: A Cargo feature that lets you build, test, and share crates
  • Crates: A tree of modules that produces a library or executable
  • Modules and use: Let you control the organization, scope, and privacy of paths
  • Paths: A way of naming an item, such as a struct, function, or module

More

The Rust Programming Language Brief Note (Vol1-Basic)

## 1 Getting Started
1
2
3
4
5
6
7
8
9
10
11
$ cargo new proj

// build
$ cargo build //dev
$ cargo check
// build result
$ ./target/debug/proj
// build + run
$ cargo run

$ cargo build --release //prod

More

Neural Architectures for Named Entity Recognition 论文笔记

Paper: 1603.01360.pdf

code:

核心思想:pretrained + character-based 词表示分别学习形态和拼写,Bi-LSTM + CRF 和基于转移的模型均可以对输出标签的依赖关系建模。

看了 Related Work 后发现很多想法其实早就冒出来了,不同的论文在不同点上使用了不同的方法,本篇恰好用这样的方法取得了最好的效果。其实,我觉得更加有意思的是基于转移的模型,它构建了一个 action 的时间序列,感觉更加抽象,想法更加精妙。

More

剑指 Offer2(Python 版)解析(Ch2)

具体实现和测试代码

系列解析(TBD):

  • Python 单例模式
  • 好玩儿的 DP
  • 递归还是递归
  • 双指针的威力
  • 双列表的威力
  • 有趣的排列组合

特别说明:下文中的实例代码一般仅包括核心算法(不一定能直接运行),完整代码可以参考对应的链接。

More

剑指 Offer2(Python 版)解析(Ch5)

具体实现和测试代码

系列解析(TBD):

  • Python 单例模式
  • 好玩儿的 DP
  • 递归还是递归
  • 双指针的威力
  • 双列表的威力
  • 有趣的排列组合

特别说明:下文中的实例代码一般仅包括核心算法(不一定能直接运行),完整代码可以参考对应的链接。

More

剑指 Offer2(Python 版)解析(Ch3)

具体实现和测试代码

系列解析(TBD):

  • Python 单例模式
  • 好玩儿的 DP
  • 递归还是递归
  • 双指针的威力
  • 双列表的威力
  • 有趣的排列组合

特别说明:下文中的实例代码一般仅包括核心算法(不一定能直接运行),完整代码可以参考对应的链接。

More

剑指 Offer2(Python 版)解析(Ch4)

具体实现和测试代码

系列解析(TBD):

  • Python 单例模式
  • 好玩儿的 DP
  • 递归还是递归
  • 双指针的威力
  • 双列表的威力
  • 有趣的排列组合

特别说明:下文中的实例代码一般仅包括核心算法(不一定能直接运行),完整代码可以参考对应的链接。

More

剑指 Offer2(Python 版)解析(Ch6)

具体实现和测试代码

系列解析(TBD):

  • Python 单例模式
  • 好玩儿的 DP
  • 递归还是递归
  • 双指针的威力
  • 双列表的威力
  • 有趣的排列组合

特别说明:下文中的实例代码一般仅包括核心算法(不一定能直接运行),完整代码可以参考对应的链接。

More

Few-Shot Charge Prediction with Discriminative Legal Attributes 论文笔记

Paper: coling2018_attribute.pdf

code: thunlp/attribute_charge

核心思想:基于类别属性的注意力机制共同学习属性感知和无属性的文本表示。

这是 COLING2018 上的一篇老论文了,最近因为一些事情正好遇上,当时大概看了一下就发现这篇文章正好解决了我之前在做多分类任务时没有解决的问题。所以拿来记录一下,顺便研究下代码。

More