Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
HashMap<String, Integer>キーが単語で、値がコーパス内での頻度である があるとします。"hello"単語を何らかの整数 (たとえば、 で表される1)に置き換えて、代わりにHashMap<Integer, Integer>? 一般に、整数は文字列よりも少ないスペースを占有しますが、キーはハッシュ関数を通過するため、それが HashMap のキーに適用できるかどうかはわかりません。前もって感謝します!
HashMap<String, Integer>
"hello"
1
HashMap<Integer, Integer>